mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-10-03 23:17:50 +03:00
refactor: make nixos-generator + /package.nix callPackage-eable
This commit is contained in:
parent
89f2a6dc56
commit
01f1b422e7
12
flake.nix
12
flake.nix
@ -116,17 +116,7 @@
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
in rec {
|
||||
default = nixos-generate;
|
||||
nixos-generate = pkgs.stdenv.mkDerivation {
|
||||
name = "nixos-generate";
|
||||
src = ./.;
|
||||
meta.description = "Collection of image builders";
|
||||
nativeBuildInputs = with pkgs; [makeWrapper];
|
||||
installFlags = ["PREFIX=$(out)"];
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/nixos-generate \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [jq coreutils findutils])}
|
||||
'';
|
||||
};
|
||||
nixos-generate = pkgs.callPackage ./package.nix {};
|
||||
});
|
||||
|
||||
checks =
|
||||
|
19
package.nix
Normal file
19
package.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
jq,
|
||||
coreutils,
|
||||
findutils,
|
||||
lib,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "nixos-generate";
|
||||
src = ./.;
|
||||
meta.description = "Collection of image builders";
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
installFlags = ["PREFIX=$(out)"];
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/nixos-generate \
|
||||
--prefix PATH : ${lib.makeBinPath [jq coreutils findutils]}
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user