diff options
Diffstat (limited to 'pkgs/development/libraries/openssl/default.nix')
-rw-r--r-- | pkgs/development/libraries/openssl/default.nix | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 6a3beee80de4..cca5049c0d43 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -2,13 +2,15 @@ , withCryptodev ? false, cryptodevHeaders }: let - name = "openssl-1.0.1e"; + name = "openssl-1.0.1i"; opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ] (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 @@ -41,7 +43,7 @@ stdenv.mkDerivation { "http://www.openssl.org/source/${name}.tar.gz" "http://openssl.linux-mirror.org/source/${name}.tar.gz" ]; - sha256 = "1qqskk39jh85fvdn3ycmdqjdf67c0b97dwmmbcysl4gzr3l1akzp"; + sha256 = "1izwv1wzqdw8aqnvb70jcqpqp0rvkcm22w5c1dm9l1kpr939y5rw"; }; patches = patchesCross false; @@ -57,15 +59,22 @@ stdenv.mkDerivation { # On x86_64-darwin, "./config" misdetects the system as # "darwin-i386-cc". So specify the system type explicitly. configureScript = - if stdenv.system == "x86_64-darwin" then "./Configure darwin64-x86_64-cc" else "./config"; + if stdenv.system == "x86_64-darwin" then "./Configure darwin64-x86_64-cc" + else if stdenv.system == "x86_64-solaris" then "./Configure solaris64-x86_64-gcc" + else "./config"; configureFlags = "shared --libdir=lib --openssldir=etc/ssl" + - stdenv.lib.optionalString withCryptodev " -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"; + stdenv.lib.optionalString withCryptodev " -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS" + + stdenv.lib.optionalString (stdenv.system == "x86_64-cygwin") " no-asm"; + + preBuild = stdenv.lib.optionalString (stdenv.system == "x86_64-cygwin") '' + sed -i -e "s|-march=i486|-march=x86-64|g" Makefile + ''; makeFlags = "MANDIR=$(man)/share/man"; # Parallel building is broken in OpenSSL. - #enableParallelBuilding = true; + enableParallelBuilding = false; postInstall = '' @@ -97,6 +106,8 @@ stdenv.mkDerivation { ''; configureScript = "./Configure"; + } // stdenv.lib.optionalAttrs (opensslCrossSystem == "darwin64-x86_64-cc") { + CC = "gcc"; }; meta = { |