Merge pull request #222136 from andrewhamon/allow-substitutions-for-write-shell-application

This commit is contained in:
Bernardo Meurer 2023-04-03 08:19:56 -07:00 committed by GitHub
commit e835abc046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,13 +132,12 @@ rec {
, destination ? "" # relative path appended to $out eg "/bin/foo"
, checkPhase ? "" # syntax checks, e.g. for scripts
, meta ? { }
, allowSubstitutes ? false
, preferLocalBuild ? true
}:
runCommand name
{ inherit text executable checkPhase meta;
{ inherit text executable checkPhase meta allowSubstitutes preferLocalBuild;
passAsFile = [ "text" ];
# Pointless to do this on a remote machine.
preferLocalBuild = true;
allowSubstitutes = false;
}
''
target=$out${lib.escapeShellArg destination}
@ -324,6 +323,8 @@ rec {
inherit name;
executable = true;
destination = "/bin/${name}";
allowSubstitutes = true;
preferLocalBuild = false;
text = ''
#!${runtimeShell}
set -o errexit