Create a Nix derivation with a default package

This commit is contained in:
Oliver Davies 2024-04-20 09:16:45 +01:00 committed by Oliver Davies
parent 2e701e7dd5
commit 0aa6d18cd4
3 changed files with 18 additions and 7 deletions

View file

@ -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;
};
}