Skip to content

Commit

Permalink
Create a Nix derivation with a default package
Browse files Browse the repository at this point in the history
  • Loading branch information
opdavies committed May 22, 2024
1 parent 2e701e7 commit 0aa6d18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/annotations": "^2.0",
"illuminate/collections": "*",
"illuminate/collections": "^10.48",
"illuminate/pipeline": "^10.8",
"illuminate/support": "^10.8",
"phpdocumentor/reflection-docblock": "^5.3",
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@
pkgs = nixpkgs.legacyPackages.${system};

inherit (pkgs) mkShell;
inherit (pkgs.php) buildComposerProject;
in {
devShells.${system}.default =
mkShell { buildInputs = with pkgs; [ just php82 php82Packages.composer ]; };

packages.${system}.default = buildComposerProject (finalAttrs: {
pname = "build-configs";
version = "0.1.0";
src = ./.;

composerLock = ./composer.lock;

vendorHash = "sha256-HElnPeC88D4kFp39/dikEd2XbqQ3xXOaDR0k48TB2tY=";
});

formatter.${system} = pkgs.nixfmt;
};
}

0 comments on commit 0aa6d18

Please sign in to comment.