diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 4dd63078d667..39e6cb3692d3 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -8,7 +8,9 @@ let (throw "openssl needs its platform name cross building" null) stdenv.cross; - patchesCross = isCross: + patchesCross = isCross: let + isDarwin = stdenv.isDarwin || (isCross && stdenv.cross.libc == "libSystem"); + in [ # Allow the location of the X509 certificate file (the CA # bundle) to be set through the environment variable # ‘OPENSSL_X509_CERT_FILE’. This is necessary because the @@ -29,7 +31,7 @@ let ./kfreebsd-gnu.patch ] - ++ stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch; + ++ stdenv.lib.optional isDarwin ./darwin-arch.patch; in