-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
nixStatic: fix darwin build #356983
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
nixStatic: fix darwin build #356983
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 |
|---|---|---|
|
|
@@ -53,6 +53,7 @@ in | |
| , gnutar | ||
| , gtest | ||
| , gzip | ||
| , iconv | ||
| , jq | ||
| , lib | ||
| , libarchive | ||
|
|
@@ -163,6 +164,20 @@ self = stdenv.mkDerivation { | |
| aws-sdk-cpp | ||
| ] ++ lib.optional (atLeast218 && stdenv.hostPlatform.isDarwin) [ | ||
| darwin.apple_sdk.libs.sandbox | ||
| ] ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic) [ | ||
| # libarchive requires a iconv.pc file to be present | ||
| (pkgs.runCommand "iconv-pkgconfig" {} '' | ||
| mkdir -p $out/lib/pkgconfig | ||
| cat > $out/lib/pkgconfig/iconv.pc <<EOF | ||
| prefix=${iconv} | ||
|
|
||
| Name: iconv | ||
| Description: GNU iconv | ||
| Version: ${lib.getVersion iconv} | ||
| Libs: -liconv | ||
| EOF | ||
| '') | ||
| iconv | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure you want this? This is the |
||
| ] ++ lib.optional (atLeast224 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ | ||
| # Fix the following error with the default x86_64-darwin SDK: | ||
| # | ||
|
|
@@ -174,6 +189,8 @@ self = stdenv.mkDerivation { | |
| (darwinMinVersionHook "10.13") | ||
| ]; | ||
|
|
||
| NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic) | ||
| "-framework CoreFoundation -framework SystemConfiguration"; | ||
|
Comment on lines
+192
to
+193
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other packages use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think adding the package will actually cause the build to link against the framework. The issue I am adding these is that I see missing symbols when linking libcurl.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally these forced linkages mean something is broken with the build upstream, I think. (Also the separate framework packages are deprecated compatibility stubs now and do nothing at all.) |
||
|
|
||
| propagatedBuildInputs = [ | ||
| boehmgc | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely there's a better way to fix this, but if this gets the job done, I'm not opposed.
I guess you could use
writeTextFilehere, but that's obviously not the problem.