Add script stage
This commit is contained in:
parent
aeac1a6068
commit
2b9c3da911
@ -72,6 +72,7 @@
|
|||||||
srun = callPackage ./stages/srun.nix { };
|
srun = callPackage ./stages/srun.nix { };
|
||||||
control = callPackage ./stages/control.nix { };
|
control = callPackage ./stages/control.nix { };
|
||||||
exec = callPackage ./stages/exec.nix { };
|
exec = callPackage ./stages/exec.nix { };
|
||||||
|
script = callPackage ./stages/script.nix { };
|
||||||
extrae = callPackage ./stages/extrae.nix { };
|
extrae = callPackage ./stages/extrae.nix { };
|
||||||
valgrind = callPackage ./stages/valgrind.nix { };
|
valgrind = callPackage ./stages/valgrind.nix { };
|
||||||
perf = callPackage ./stages/perf.nix { };
|
perf = callPackage ./stages/perf.nix { };
|
||||||
|
23
garlic/stages/script.nix
Normal file
23
garlic/stages/script.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
script
|
||||||
|
, shell ? "/bin/sh"
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "script";
|
||||||
|
preferLocalBuild = true;
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
installPhase = ''
|
||||||
|
cat > $out <<'EOF'
|
||||||
|
#!${shell}
|
||||||
|
|
||||||
|
${script}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
chmod +x $out
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user