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

@ -3,6 +3,8 @@ final: prev: {
s6-init-files = final.callPackage ./pkgs/s6-init-files {}; s6-init-files = final.callPackage ./pkgs/s6-init-files {};
strace = prev.strace.override { libunwind = null; }; strace = prev.strace.override { libunwind = null; };
liminix = final.callPackage ./pkgs/liminix-tools {}; liminix = final.callPackage ./pkgs/liminix-tools {};
writeAshScript = final.callPackage ./pkgs/write-ash-script {};
pppoe = prev.rpPPPoE.overrideAttrs (o: { pppoe = prev.rpPPPoE.overrideAttrs (o: {
# use newer rp-pppoe, it builds cleanly # use newer rp-pppoe, it builds cleanly
src = final.fetchFromGitHub { src = final.fetchFromGitHub {

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}
''