krebs pkgs.writeBash{,Bin}: init

This commit is contained in:
tv 2016-06-05 00:24:42 +02:00
parent fc826f8f7a
commit a0a2606f8d

View File

@ -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