diff options
author | lassulus <lassulus@lassul.us> | 2017-08-01 13:46:49 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-08-01 13:46:49 +0200 |
commit | ef128bdd0fea2442bbf9775fccd3eb4ca71bfdcc (patch) | |
tree | 0f7aea47e8e73d24bb03de4f4c7e831b38c86f00 /krebs/5pkgs | |
parent | b95e15654d66607a416b2ba0e87a5d9dd0fe09ed (diff) | |
parent | e19b506f36c8848ece02d7796a91ff0634191609 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/writers.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix index f1626078e..850ee6f1a 100644 --- a/krebs/5pkgs/writers.nix +++ b/krebs/5pkgs/writers.nix @@ -29,10 +29,11 @@ with import <stockholm/lib>; execveBin = name: cfg: pkgs.execve name (cfg // { destination = "/bin/${name}"; }); - makeScriptWriter = interpreter: name: text: + makeScriptWriter = { interpreter, check ? null }: name: text: assert (with types; either absolute-pathname filename).check name; pkgs.writeOut (baseNameOf name) { ${optionalString (types.absolute-pathname.check name) name} = { + inherit check; executable = true; text = "#! ${interpreter}\n${text}"; }; @@ -69,7 +70,9 @@ with import <stockholm/lib>; strip --strip-unneeded "$exe" ''; - writeDash = pkgs.makeScriptWriter "${pkgs.dash}/bin/dash"; + writeDash = pkgs.makeScriptWriter { + interpreter = "${pkgs.dash}/bin/dash"; + }; writeDashBin = name: assert types.filename.check name; @@ -305,5 +308,7 @@ with import <stockholm/lib>; }; }; - writeSed = pkgs.makeScriptWriter "${pkgs.gnused}/bin/sed -f"; + writeSed = pkgs.makeScriptWriter { + interpreter = "${pkgs.gnused}/bin/sed -f"; + }; } |