diff options
author | tv <tv@krebsco.de> | 2016-06-05 00:24:42 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-06-05 00:24:42 +0200 |
commit | a0a2606f8d3469baa2b05cdb17c88ce031484e14 (patch) | |
tree | b1b83402134245d2f211f55f9b332430e573af71 /krebs | |
parent | fc826f8f7a613c68e595e16fd793b0b318425af8 (diff) |
krebs pkgs.writeBash{,Bin}: init
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/5pkgs/builders.nix | 15 |
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 |