summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/builders.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-05 00:24:42 +0200
committertv <tv@krebsco.de>2016-06-05 00:24:42 +0200
commita0a2606f8d3469baa2b05cdb17c88ce031484e14 (patch)
treeb1b83402134245d2f211f55f9b332430e573af71 /krebs/5pkgs/builders.nix
parentfc826f8f7a613c68e595e16fd793b0b318425af8 (diff)
krebs pkgs.writeBash{,Bin}: init
Diffstat (limited to 'krebs/5pkgs/builders.nix')
-rw-r--r--krebs/5pkgs/builders.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix
index ac355991a..f60bbc9d0 100644
--- a/krebs/5pkgs/builders.nix
+++ b/krebs/5pkgs/builders.nix
@@ -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