Get rid of most @rpath nonsense on Darwin
This requires some small changes in the stdenv, then working around the weird choice LLVM made to hardcode @rpath in its install name, and then lets us remove a ton of annoying workaround hacks in many of our Go packages. With any luck this will mean less hackery going forward.
This commit is contained in:
@@ -81,7 +81,20 @@ let
|
||||
|
||||
setup = setupScript;
|
||||
|
||||
inherit preHook initialPath shell
|
||||
# We pretty much never need rpaths on Darwin, since all library path references
|
||||
# are absolute unless we go out of our way to make them relative (like with CF)
|
||||
# TODO: This really wants to be in stdenv/darwin but we don't have hostPlatform
|
||||
# there (yet?) so it goes here until then.
|
||||
preHook = preHook+ lib.optionalString buildPlatform.isDarwin ''
|
||||
export NIX_BUILD_DONT_SET_RPATH=1
|
||||
'' + lib.optionalString hostPlatform.isDarwin ''
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
'' + lib.optionalString targetPlatform.isDarwin ''
|
||||
export NIX_TARGET_DONT_SET_RPATH=1
|
||||
'';
|
||||
|
||||
inherit initialPath shell
|
||||
defaultNativeBuildInputs defaultBuildInputs;
|
||||
}
|
||||
// lib.optionalAttrs buildPlatform.isDarwin {
|
||||
|
||||
Reference in New Issue
Block a user