2010-01-20 14:49:07 +01: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-27 21:05:43 +02:00
|
|
|
stdenv.mkDerivation (rec {
|
2010-04-27 20:39:00 +02:00
|
|
|
name = "openssl-1.0.0";
|
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-27 20:39:00 +02:00
|
|
|
sha1 = "3f800ea9fa3da1c0f576d689be7dca3d55a4cb62";
|
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 10:40:12 +02:00
|
|
|
configureFlags="--libdir=lib shared";
|
2008-10-09 16:29:06 +02:00
|
|
|
|
2010-03-06 00:22:36 +01:00
|
|
|
crossAttrs = {
|
2010-04-28 10:40:12 +02:00
|
|
|
preConfigure=''
|
2010-03-06 00:22:36 +01:00
|
|
|
export cross=$crossSystem-
|
|
|
|
'';
|
2010-04-28 10:40:12 +02:00
|
|
|
configureFlags="--libdir=lib ${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-01-20 14:49:07 +01:00
|
|
|
}
|
2010-04-27 21:05:43 +02:00
|
|
|
//
|
|
|
|
(if stdenv.isDarwin then {
|
|
|
|
patches = ./darwin-arch.patch;
|
|
|
|
}
|
|
|
|
else { })
|
|
|
|
)
|