bscpkgs/bsc/garlic/control.nix

25 lines
311 B
Nix
Raw Normal View History

2020-08-11 12:05:43 +02:00
{
stdenv
}:
2020-09-02 17:07:09 +02:00
{
program
}:
2020-08-11 12:05:43 +02:00
stdenv.mkDerivation {
2020-09-02 17:07:09 +02:00
name = "control";
2020-08-11 12:05:43 +02:00
preferLocalBuild = true;
phases = [ "installPhase" ];
dontPatchShebangs = true;
installPhase = ''
2020-09-02 17:07:09 +02:00
cat > $out <<EOF
2020-08-11 12:05:43 +02:00
#!/bin/sh
2020-09-02 10:44:13 +02:00
#set -e
2020-08-11 12:05:43 +02:00
for n in {1..30}; do
2020-09-02 17:07:09 +02:00
${program}
2020-08-11 12:05:43 +02:00
done
EOF
2020-09-02 17:07:09 +02:00
chmod +x $out
2020-08-11 12:05:43 +02:00
'';
}