diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index e9d75b78ebf2..4d0e0cd8afbd 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -1,5 +1,11 @@ { stdenv, fetchurl, perl }: +let + opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ] + (throw "openssl needs its platform name cross building" null) + stdenv.cross; +in + stdenv.mkDerivation rec { name = "openssl-0.9.8l"; @@ -10,12 +16,24 @@ stdenv.mkDerivation rec { patches = [ ./darwin-arch.patch ]; - buildInputs = [ perl ]; + buildNativeInputs = [ perl ]; configureScript = "./config"; configureFlags = "shared"; + crossAttrs = { + configurePhase = '' + export cross=$crossSystem- + ./Configure --prefix=$out ${opensslCrossSystem} shared + ''; + buildPhase = '' + make CC=$crossConfig-gcc \ + AR="$crossConfig-ar r" \ + RANLIB=$crossConfig-ranlib + ''; + }; + meta = { homepage = http://www.openssl.org/; description = "A cryptographic library that implements the SSL and TLS protocols"; diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index f3c8ab1b34cf..8687a4af884b 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { sha256 = "844e5878d55a68ae2aac657718a1960dcfc943f6738ebdfb2bc93e8c462d0ad7"; }; - buildInputs = [perl curl openssl]; + buildNativeInputs = [perl]; + buildInputs = [curl openssl]; configureFlags = '' --with-store-dir=${storeDir} --localstatedir=${stateDir} diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 1df7507906ee..851294de9571 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -704,12 +704,13 @@ in { /* Test some cross builds to the Sheevaplug */ let crossSystem = { - config = "armv5tel-unknown-linux-gnueabi"; - bigEndian = false; - arch = "arm"; - float = "soft"; - withTLS = true; - platform = pkgs.platforms.sheevaplug; + config = "armv5tel-unknown-linux-gnueabi"; + bigEndian = false; + arch = "arm"; + float = "soft"; + withTLS = true; + platform = pkgs.platforms.sheevaplug; + openssl.system = "linux-generic32"; }; nativePlatforms = linux; in { @@ -722,6 +723,7 @@ in { xorg = { #xorgserver = nativePlatforms; }; + nixUnstable = linux; linuxPackages_2_6_32.kernel = linux; linuxPackages_2_6_33.kernel = linux; gdbCross = nativePlatforms; @@ -745,6 +747,7 @@ let kernelAutoModules = false; kernelTarget = "vmlinux.bin"; }; + openssl.system = "linux-generic32"; }; nativePlatforms = linux; in { @@ -757,6 +760,7 @@ in { xorg = { #xorgserver = nativePlatforms; }; + nixUnstable = linux; linuxPackages_2_6_32.kernel = linux; linuxPackages_2_6_33.kernel = linux; gdbCross = nativePlatforms; @@ -781,6 +785,7 @@ let kernelTarget = "zImage"; uboot = null; }; + openssl.system = "linux64-sparcv9"; }; nativePlatforms = linux; in { @@ -793,6 +798,7 @@ in { xorg = { #xorgserver = nativePlatforms; }; + nixUnstable = linux; linuxPackages_2_6_32.kernel = linux; linuxPackages_2_6_33.kernel = linux; gdbCross = nativePlatforms;