krebs pkgs.writeBash{,Bin}: init
This commit is contained in:
parent
fc826f8f7a
commit
a0a2606f8d
|
@ -28,6 +28,21 @@ rec {
|
|||
|
||||
execveBin = name: cfg: execve name (cfg // { destination = "/bin/${name}"; });
|
||||
|
||||
writeBash = name: text: pkgs.writeScript name ''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
${text}
|
||||
'';
|
||||
|
||||
writeBashBin = name: text: pkgs.writeTextFile {
|
||||
executable = true;
|
||||
destination = "/bin/${name}";
|
||||
name = name;
|
||||
text = ''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
${text}
|
||||
'';
|
||||
};
|
||||
|
||||
writeC = name: { destination ? "" }: src: pkgs.runCommand name {} ''
|
||||
PATH=${makeBinPath (with pkgs; [
|
||||
binutils
|
||||
|
|
Loading…
Reference in a new issue