bscpkgs/garlic/stages/control.nix
Rodrigo Arias Mallo a576be8031 WIP stage redesign
2020-10-09 16:42:06 +02:00

28 lines
382 B
Nix

{
stdenv
, garlicTools
}:
{
nextStage
, loops ? 30
}:
with garlicTools;
stdenv.mkDerivation {
name = "control";
preferLocalBuild = true;
phases = [ "installPhase" ];
dontPatchShebangs = true;
installPhase = ''
cat > $out <<EOF
#!/bin/sh
for n in \$(seq 1 ${toString loops}); do
${stageProgram nextStage}
done
EOF
chmod +x $out
'';
}