nixpkgs/pkgs/tools/nix/nixos-generators/default.nix
2021-05-22 07:05:27 +02:00

26 lines
817 B
Nix

{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils, jq, findutils, nix }:
stdenv.mkDerivation rec {
pname = "nixos-generators";
version = "1.3.0";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixos-generators";
rev = version;
sha256 = "1gbj2jw7zv3mnq1lyj4q53jpfj642jy7lvg0kp060znvhws3370y";
};
nativeBuildInputs = [ makeWrapper ];
installFlags = [ "PREFIX=$(out)" ];
postFixup = ''
wrapProgram $out/bin/nixos-generate \
--prefix PATH : ${lib.makeBinPath [ jq coreutils findutils nix ] }
'';
meta = with lib; {
description = "Collection of image builders";
homepage = "https://github.com/nix-community/nixos-generators";
license = licenses.mit;
maintainers = with maintainers; [ lassulus ];
platforms = platforms.unix;
};
}