curl: link libiconv in static builds on Darwin
Some of curl’s dependencies require libiconv, but the `configure` script is not including `-liconv` in the linker flags when checking for those dependencies in static builds. That causes the check to fail and prevents curl from building statically on Darwin.
This commit is contained in:
@@ -82,6 +82,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic) {
|
||||
# Not having this causes curl’s `configure` script to fail with static builds on Darwin because
|
||||
# some of curl’s propagated inputs need libiconv.
|
||||
NIX_LDFLAGS = "-liconv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config perl ];
|
||||
|
||||
# Zlib and OpenSSL must be propagated because `libcurl.la' contains
|
||||
|
||||
Reference in New Issue
Block a user