Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkgs/tools/package-management/nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ in
, gnutar
, gtest
, gzip
, iconv
, jq
, lib
, libarchive
Expand Down Expand Up @@ -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
'')
Comment on lines +169 to +179
Copy link
Member

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 writeTextFile here, but that's obviously not the problem.

iconv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want this? This is the iconv(1) binary. libiconv is already provided by the base SDK.

] ++ lib.optional (atLeast224 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# Fix the following error with the default x86_64-darwin SDK:
#
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other packages use buildInputs for this, and actual CoreFoundation (etc.) packages.

Copy link
Member Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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
Expand Down