diff options
author | Profpatsch <mail@profpatsch.de> | 2020-02-18 19:53:18 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-02-18 19:53:18 +0100 |
commit | 493c357720bceb8f7eb21c130b5d955c2c4b6fe6 (patch) | |
tree | 2a65e1adfeb62f223a17b09d3d8055e06fc1652b /pkgs/build-support/writers | |
parent | 55e15293359935cceec8c6380bfb9edd3ceb7714 (diff) | |
download | nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.tar nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.tar.gz nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.tar.bz2 nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.tar.lz nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.tar.xz nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.tar.zst nixpkgs-493c357720bceb8f7eb21c130b5d955c2c4b6fe6.zip |
pkgs/build-support/writers: use `runCommandLocal` for scripts
If we just want to write a non-compiled script (e.g. writeDash), it’s usually a lot faster just doing it locally. That’s what `runCommandLocal` was introduced for, so let’s use it in `writers`.
Diffstat (limited to 'pkgs/build-support/writers')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index b90c6490e4a..af492d80db0 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -15,7 +15,7 @@ rec { name = last (builtins.split "/" nameOrPath); in - pkgs.runCommand name (if (types.str.check content) then { + pkgs.runCommandLocal name (if (types.str.check content) then { inherit content interpreter; passAsFile = [ "content" ]; } else { @@ -192,7 +192,7 @@ rec { {id="";for(i=idx;i<ctx;i++)id=sprintf("%s%s", id, "\t");printf "%s%s\n", id, $0} ''; - writeNginxConfig = name: text: pkgs.runCommand name { + writeNginxConfig = name: text: pkgs.runCommandLocal name { inherit text; passAsFile = [ "text" ]; } /* sh */ '' |