pkgs.writeAshScript is similar to writeShellScript but busybox

This commit is contained in:
Daniel Barlow
2022-09-25 20:50:20 +01:00
parent 3540f594b1
commit 01aa423dad
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{
busybox
, writeScript
, lib
}
: name : { runtimeInputs ? [] } : text : writeScript name ''
#!${busybox}/bin/sh
set -o errexit
set -o nounset
set -o pipefail
export PATH="${lib.makeBinPath ([ busybox ] ++ runtimeInputs)}:$PATH"
${text}
''