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:
Randy Eckenrode
2024-10-10 01:06:59 -04:00
parent 2ab1817d71
commit fbf56c14a8
+6
View File
@@ -82,6 +82,12 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic) {
# Not having this causes curls `configure` script to fail with static builds on Darwin because
# some of curls propagated inputs need libiconv.
NIX_LDFLAGS = "-liconv";
};
nativeBuildInputs = [ pkg-config perl ];
# Zlib and OpenSSL must be propagated because `libcurl.la' contains