-
-
Notifications
You must be signed in to change notification settings - Fork 18k
stdenv/darwin: set NIX_COREFOUNDATION_RPATH via hook #111385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| useCoreFoundationFramework () { | ||
| # Avoid overriding value set by the impure CF | ||
| if [ -z "${NIX_COREFOUNDATION_RPATH+x}" ]; then | ||
| export NIX_COREFOUNDATION_RPATH=@out@/Library/Frameworks | ||
| fi | ||
| } | ||
|
|
||
| addEnvHooks "$hostOffset" useCoreFoundationFramework |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,8 @@ let | |
| "/usr/lib/libSystem.B.dylib" | ||
| "/usr/lib/system/libunc.dylib" # This dependency is "hidden", so our scanning code doesn't pick it up | ||
| ]; | ||
|
|
||
| withoutRpathHook = drv: drv.override { withRpathHook = false; }; | ||
| in rec { | ||
| commonPreHook = '' | ||
| export NIX_ENFORCE_NO_NATIVE=''${NIX_ENFORCE_NO_NATIVE-1} | ||
|
|
@@ -343,7 +345,8 @@ in rec { | |
| darwin = super.darwin // { | ||
| inherit (darwin) | ||
| binutils dyld Libsystem xnu configd ICU libdispatch libclosure | ||
| launchd CF darwin-stubs; | ||
| launchd darwin-stubs; | ||
| CF = withoutRpathHook darwin.CF; | ||
| }; | ||
| }; | ||
| in with prevStage; stageFun 2 prevStage { | ||
|
|
@@ -352,7 +355,7 @@ in rec { | |
| ''; | ||
|
|
||
| extraNativeBuildInputs = [ pkgs.xz ]; | ||
| extraBuildInputs = [ pkgs.darwin.CF ]; | ||
| extraBuildInputs = [ (withoutRpathHook pkgs.darwin.CF) ]; | ||
| libcxx = pkgs.libcxx; | ||
|
|
||
| allowedRequisites = | ||
|
|
@@ -399,7 +402,7 @@ in rec { | |
| # and instead goes by $PATH, which happens to contain bootstrapTools. So it goes and | ||
| # patches our shebangs back to point at bootstrapTools. This makes sure bash comes first. | ||
| extraNativeBuildInputs = with pkgs; [ xz ]; | ||
| extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ]; | ||
| extraBuildInputs = [ (withoutRpathHook pkgs.darwin.CF) pkgs.bash ]; | ||
| libcxx = pkgs.libcxx; | ||
|
|
||
| extraPreHook = '' | ||
|
|
@@ -448,16 +451,16 @@ in rec { | |
| darwin = super.darwin // rec { | ||
| inherit (darwin) dyld Libsystem libiconv locale darwin-stubs; | ||
|
|
||
| CF = super.darwin.CF.override { | ||
| CF = withoutRpathHook (super.darwin.CF.override { | ||
| inherit libxml2; | ||
| python3 = prevStage.python3; | ||
| }; | ||
| }); | ||
| }; | ||
| }; | ||
| in with prevStage; stageFun 4 prevStage { | ||
| shell = "${pkgs.bash}/bin/bash"; | ||
| extraNativeBuildInputs = with pkgs; [ xz ]; | ||
| extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ]; | ||
| extraBuildInputs = [ (withoutRpathHook pkgs.darwin.CF) pkgs.bash ]; | ||
| libcxx = pkgs.libcxx; | ||
|
|
||
| extraPreHook = '' | ||
|
|
@@ -503,7 +506,6 @@ in rec { | |
| targetPlatform = localSystem; | ||
|
|
||
| preHook = commonPreHook + '' | ||
| export NIX_COREFOUNDATION_RPATH=${pkgs.darwin.CF}/Library/Frameworks | ||
|
||
| export PATH_LOCALE=${pkgs.darwin.locale}/share/locale | ||
| ''; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.