mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 18:14:42 +00:00
curl: fixes for static linking on Darwin (#346950)
This commit is contained in:
commit
2ecae25333
@ -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
|
||||
@ -228,7 +234,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
maintainers = with lib.maintainers; [ lovek323 ];
|
||||
platforms = lib.platforms.all;
|
||||
# Fails to link against static brotli or gss
|
||||
broken = stdenv.hostPlatform.isStatic && (brotliSupport || gssSupport || stdenv.hostPlatform.system == "x86_64-darwin");
|
||||
broken = stdenv.hostPlatform.isStatic && (brotliSupport || gssSupport);
|
||||
pkgConfigModules = [ "libcurl" ];
|
||||
mainProgram = "curl";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user