2010-07-08 15:25:52 +02:00
|
|
|
{ stdenv, fetchurl, perl, ...}:
|
2008-04-23 09:34:20 +02:00
|
|
|
|
2010-03-06 00:22:36 +01:00
|
|
|
let
|
|
|
|
opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]
|
|
|
|
(throw "openssl needs its platform name cross building" null)
|
|
|
|
stdenv.cross;
|
|
|
|
in
|
|
|
|
|
2010-04-29 10:19:13 +02:00
|
|
|
stdenv.mkDerivation ( rec {
|
2010-04-28 17:01:06 +02:00
|
|
|
name = "openssl-0.9.8n";
|
2008-10-09 16:29:06 +02:00
|
|
|
|
2006-09-29 23:17:10 +02:00
|
|
|
src = fetchurl {
|
2010-01-20 14:49:07 +01:00
|
|
|
url = "http://www.openssl.org/source/${name}.tar.gz";
|
2010-04-28 17:01:06 +02:00
|
|
|
sha256 = "008z1h09pa6dfxs4wgbqj5i1clw4v82b1waqvwanb1kb6wlbq6mh";
|
2006-09-29 23:17:10 +02:00
|
|
|
};
|
2010-01-20 14:49:07 +01:00
|
|
|
|
2010-03-06 00:22:36 +01:00
|
|
|
buildNativeInputs = [ perl ];
|
2008-10-09 16:29:06 +02:00
|
|
|
|
|
|
|
configureScript = "./config";
|
|
|
|
|
2010-04-28 17:01:02 +02:00
|
|
|
configureFlags = "shared";
|
2008-10-09 16:29:06 +02:00
|
|
|
|
2010-03-06 00:22:36 +01:00
|
|
|
crossAttrs = {
|
2010-04-28 17:01:02 +02:00
|
|
|
configurePhase = ''
|
2010-03-06 00:22:36 +01:00
|
|
|
export cross=$crossSystem-
|
2010-04-28 17:01:02 +02:00
|
|
|
./Configure --prefix=$out ${opensslCrossSystem} shared
|
2010-03-06 00:22:36 +01:00
|
|
|
'';
|
|
|
|
buildPhase = ''
|
|
|
|
make CC=$crossConfig-gcc \
|
|
|
|
AR="$crossConfig-ar r" \
|
|
|
|
RANLIB=$crossConfig-ranlib
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2008-10-09 16:29:06 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.openssl.org/;
|
|
|
|
description = "A cryptographic library that implements the SSL and TLS protocols";
|
|
|
|
};
|
2010-04-29 10:19:13 +02:00
|
|
|
} // (if stdenv.isDarwin then { patches = [./darwin-arch.patch]; } else {}) )
|