summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-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