Skip to content

Commit 5aec01d

Browse files
committed
Refactor flake and add new clause to README
1 parent 280dac1 commit 5aec01d

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ dependencies:
5757
$ composer install
5858
```
5959

60+
Lastly, if you have flakes enabled on your machine, you can build it by running:
61+
62+
```bash
63+
nix build .
64+
```
65+
66+
in the root of the repo, where you'll then find the executable in
67+
`/result/bin/composer2nix`.
68+
6069
Usage
6170
=====
6271
You need a project providing a `composer.json` and (if applicable) a

flake.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
};
2525

2626
composer2nix = import ./php-packages.nix {
27-
inherit composerEnv noDev;
28-
inherit (pkgs) fetchurl fetchgit fetchhg fetchsvn;
27+
inherit composerEnv noDev;
28+
inherit (pkgs) fetchurl fetchgit fetchhg fetchsvn;
2929
};
30-
in
31-
rec {
30+
3231
packages.composer2nix = composer2nix;
3332
defaultPackage = packages.composer2nix;
34-
});
33+
in
34+
{ inherit packages defaultPackage; }
35+
36+
);
3537

3638

3739
}

0 commit comments

Comments
 (0)