Archived
1
0
forked from rarias/bscpkgs

Add script stage

This commit is contained in:
2021-01-12 18:19:49 +01:00
parent aeac1a6068
commit 2b9c3da911
2 changed files with 24 additions and 0 deletions

23
garlic/stages/script.nix Normal file
View 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
'';
}