Merge pull request #222136 from andrewhamon/allow-substitutions-for-write-shell-application
This commit is contained in:
commit
e835abc046
1 changed files with 5 additions and 4 deletions
|
@ -132,13 +132,12 @@ rec {
|
||||||
, destination ? "" # relative path appended to $out eg "/bin/foo"
|
, destination ? "" # relative path appended to $out eg "/bin/foo"
|
||||||
, checkPhase ? "" # syntax checks, e.g. for scripts
|
, checkPhase ? "" # syntax checks, e.g. for scripts
|
||||||
, meta ? { }
|
, meta ? { }
|
||||||
|
, allowSubstitutes ? false
|
||||||
|
, preferLocalBuild ? true
|
||||||
}:
|
}:
|
||||||
runCommand name
|
runCommand name
|
||||||
{ inherit text executable checkPhase meta;
|
{ inherit text executable checkPhase meta allowSubstitutes preferLocalBuild;
|
||||||
passAsFile = [ "text" ];
|
passAsFile = [ "text" ];
|
||||||
# Pointless to do this on a remote machine.
|
|
||||||
preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
target=$out${lib.escapeShellArg destination}
|
target=$out${lib.escapeShellArg destination}
|
||||||
|
@ -324,6 +323,8 @@ rec {
|
||||||
inherit name;
|
inherit name;
|
||||||
executable = true;
|
executable = true;
|
||||||
destination = "/bin/${name}";
|
destination = "/bin/${name}";
|
||||||
|
allowSubstitutes = true;
|
||||||
|
preferLocalBuild = false;
|
||||||
text = ''
|
text = ''
|
||||||
#!${runtimeShell}
|
#!${runtimeShell}
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
Loading…
Reference in a new issue