1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/test/installer.nix

23 lines
459 B
Nix
Raw Normal View History

{ stdenv, genericSubstituter, shell, nix
}:
genericSubstituter {
src = ./installer.sh;
dir = "bin";
isExecutable = true;
inherit shell nix;
nixClosure = stdenv.mkDerivation {
name = "closure";
exportReferencesGraph = ["refs" nix];
builder = builtins.toFile "builder.sh" "
source $stdenv/setup
if ! test -e refs; then
echo 'Your Nix installation is too old!'
exit 1
fi
cp refs $out
";
};
}