diff options
author | lassulus <lassulus@lassul.us> | 2018-10-27 13:15:27 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-10-27 13:17:34 +0200 |
commit | 40fde9eaad2c843f13cd10f33396d2e18b0e95fb (patch) | |
tree | a6fa256a03c80b2051d3f219aef7c0c2608ae8da /pkgs | |
parent | 1cfb083a20ffdc5d961357af944aafb129a6e638 (diff) |
implement writeBash with makeScriptWriter
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/default.nix | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 084702d..5bce622 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -164,14 +164,9 @@ pkgs: oldpkgs: { echo hello world '' */ - writeBash = name: text: - assert (with types; either absolute-pathname filename).check name; - pkgs.write (baseNameOf name) { - ${optionalString (types.absolute-pathname.check name) name} = { - executable = true; - text = "#! ${pkgs.bash}/bin/bash\n${text}"; - }; - }; + writeBash = pkgs.makeScriptWriter { + interpreter = "${pkgs.bash}/bin/bash"; + }; writeBashBin = name: assert types.filename.check name; |