depot/third_party/nixpkgs/pkgs/tools/nix/nixos-generators/default.nix
Default email dae973cb59 Project import generated by Copybara.
GitOrigin-RevId: c90c4025bb6e0c4eaf438128a3b2640314b1c58d
2023-03-08 18:32:21 +02:00

29 lines
904 B
Nix

{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils, jq, findutils, nix, bash }:
stdenv.mkDerivation rec {
pname = "nixos-generators";
version = "1.7.0";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixos-generators";
rev = version;
sha256 = "sha256-WecDwDY/hEcDQYzFnccCNa+5Umht0lfjx/d1qGDy/rQ=";
};
strictDeps = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
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 ];
mainProgram = "nixos-generate";
platforms = platforms.unix;
};
}