pkgs.writeAshScript is similar to writeShellScript but busybox
This commit is contained in:
14
pkgs/write-ash-script/default.nix
Normal file
14
pkgs/write-ash-script/default.nix
Normal 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}
|
||||
''
|
Reference in New Issue
Block a user