From a0a2606f8d3469baa2b05cdb17c88ce031484e14 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 5 Jun 2016 00:24:42 +0200 Subject: krebs pkgs.writeBash{,Bin}: init --- krebs/5pkgs/builders.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- cgit v1.2.3