diff --git a/garlic/index.nix b/garlic/index.nix index 5e2bd60..9a1ba14 100644 --- a/garlic/index.nix +++ b/garlic/index.nix @@ -72,6 +72,7 @@ srun = callPackage ./stages/srun.nix { }; control = callPackage ./stages/control.nix { }; exec = callPackage ./stages/exec.nix { }; + script = callPackage ./stages/script.nix { }; extrae = callPackage ./stages/extrae.nix { }; valgrind = callPackage ./stages/valgrind.nix { }; perf = callPackage ./stages/perf.nix { }; diff --git a/garlic/stages/script.nix b/garlic/stages/script.nix new file mode 100644 index 0000000..4be3cec --- /dev/null +++ b/garlic/stages/script.nix @@ -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 + ''; +}