removeReferencesTo: unbreak when __structuredAttrs is enabled
When `__structuredAttrs` is enabled, the `remove-references-to` script ends up being built with a shebang of `#!@shell@` (among other, Darwin- specific, breakages), as `$shell` isn't defined. A small interlude: the eagle-eyed stdenv knowers reading this may be thinking to themselves, "Doesn't stdenv set `$shell` if it's not defined?" This is true... *but* consider the state of this file before this change: it had `shell` as an argument to `mkDerivation`, and arguments to `mkDerivation` get defined as *Bash variables*. So, when stdenv was checking to see if `$shell` was defined, it was looking at the *Bash variable* and not the environment variable.
This commit is contained in:
@@ -34,8 +34,10 @@ stdenv.mkDerivation {
|
||||
substituteAll ${./darwin-sign-fixup.sh} $out/nix-support/setup-hooks.sh
|
||||
'';
|
||||
|
||||
inherit (builtins) storeDir;
|
||||
shell = lib.getBin shell + (shell.shellPath or "");
|
||||
signingUtils = if darwinCodeSign then signingUtils else null;
|
||||
env = {
|
||||
inherit (builtins) storeDir;
|
||||
shell = lib.getBin shell + (shell.shellPath or "");
|
||||
} // lib.optionalAttrs darwinCodeSign { inherit signingUtils; };
|
||||
|
||||
meta.mainProgram = "remove-references-to";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user