openssl: cc-wrapper can be relied on to export these env vars
This commit is contained in:
parent
c23028bdad
commit
60eff17b27
@ -1,12 +1,14 @@
|
|||||||
{ stdenv, fetchurl, buildPackages, perl
|
{ stdenv, fetchurl, buildPackages, perl
|
||||||
|
, hostPlatform
|
||||||
, withCryptodev ? false, cryptodevHeaders
|
, withCryptodev ? false, cryptodevHeaders
|
||||||
, enableSSL2 ? false }:
|
, enableSSL2 ? false
|
||||||
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
opensslCrossSystem = stdenv.cross.openssl.system or
|
opensslCrossSystem = hostPlatform.openssl.system or
|
||||||
(throw "openssl needs its platform name cross building");
|
(throw "openssl needs its platform name cross building");
|
||||||
|
|
||||||
common = args@{ version, sha256, patches ? [] }: stdenv.mkDerivation rec {
|
common = args@{ version, sha256, patches ? [] }: stdenv.mkDerivation rec {
|
||||||
@ -23,8 +25,7 @@ let
|
|||||||
++ optional (versionOlder version "1.1.0")
|
++ optional (versionOlder version "1.1.0")
|
||||||
(if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
|
(if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
|
||||||
++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch
|
++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch
|
||||||
++ optional
|
++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin)
|
||||||
(versionOlder version "1.0.2" && (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem")))
|
|
||||||
./darwin-arch.patch;
|
./darwin-arch.patch;
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "out" "man" ];
|
outputs = [ "bin" "dev" "out" "man" ];
|
||||||
@ -89,10 +90,6 @@ let
|
|||||||
preConfigure=''
|
preConfigure=''
|
||||||
# It's configure does not like --build or --host
|
# It's configure does not like --build or --host
|
||||||
export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}"
|
export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}"
|
||||||
# WINDRES and RANLIB need to be prefixed when cross compiling;
|
|
||||||
# the openssl configure script doesn't do that for us
|
|
||||||
export WINDRES=${stdenv.cross.config}-windres
|
|
||||||
export RANLIB=${stdenv.cross.config}-ranlib
|
|
||||||
'';
|
'';
|
||||||
configureScript = "./Configure";
|
configureScript = "./Configure";
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user