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
|
@ -15,7 +15,7 @@ rec {
|
||||||
name = last (builtins.split "/" nameOrPath);
|
name = last (builtins.split "/" nameOrPath);
|
||||||
in
|
in
|
||||||
|
|
||||||
pkgs.runCommand name (if (types.str.check content) then {
|
pkgs.runCommandLocal name (if (types.str.check content) then {
|
||||||
inherit content interpreter;
|
inherit content interpreter;
|
||||||
passAsFile = [ "content" ];
|
passAsFile = [ "content" ];
|
||||||
} else {
|
} 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}
|
{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;
|
inherit text;
|
||||||
passAsFile = [ "text" ];
|
passAsFile = [ "text" ];
|
||||||
} /* sh */ ''
|
} /* sh */ ''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user