forked from rarias/bscpkgs
New stage design
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
stdenv
|
||||
}:
|
||||
|
||||
program:
|
||||
{
|
||||
program
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit program;
|
||||
name = "${program.name}-nixsetup";
|
||||
name = "nixsetup";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
dontPatchShebangs = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/run <<EOF
|
||||
cat > $out <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
# We need to enter the nix namespace first, in order to have /nix
|
||||
@@ -21,8 +21,8 @@ stdenv.mkDerivation {
|
||||
exec nix-setup \$0
|
||||
fi
|
||||
|
||||
exec $program/bin/run
|
||||
exec ${program}
|
||||
EOF
|
||||
chmod +x $out/bin/run
|
||||
chmod +x $out
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user