bscpkgs/bsc/garlic/control.nix
2020-09-03 16:18:50 +02:00

26 lines
339 B
Nix

{
stdenv
}:
{
program
, loops ? 30
}:
stdenv.mkDerivation {
name = "control";
preferLocalBuild = true;
phases = [ "installPhase" ];
dontPatchShebangs = true;
installPhase = ''
cat > $out <<EOF
#!/bin/sh
#set -e
for n in {1..${toString loops}}; do
${program}
done
EOF
chmod +x $out
'';
}