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`.
This commit is contained in:
parent
55e1529335
commit
493c357720
1 changed files with 2 additions and 2 deletions
|
@ -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 */ ''
|
||||
|
|
Loading…
Reference in a new issue