Skip to content

Commit

Permalink
Merge pull request NixOS#222136 from andrewhamon/allow-substitutions-…
Browse files Browse the repository at this point in the history
…for-write-shell-application
  • Loading branch information
lovesegfault authored Apr 3, 2023
2 parents ad2031b + e929a99 commit e835abc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/build-support/trivial-builders.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -324,6 +323,8 @@ rec {
inherit name;
executable = true;
destination = "/bin/${name}";
allowSubstitutes = true;
preferLocalBuild = false;
text = ''
#!${runtimeShell}
set -o errexit
Expand Down

0 comments on commit e835abc

Please sign in to comment.