Merge 'staging' into multiple-outputs
Conflicts: pkgs/applications/audio/flac/default.nix pkgs/build-support/gcc-wrapper/builder.sh pkgs/development/libraries/apr-util/default.nix pkgs/development/libraries/apr/default.nix pkgs/development/libraries/atk/default.nix pkgs/development/libraries/freetype/default.nix pkgs/development/libraries/gdk-pixbuf/default.nix pkgs/development/libraries/glib/default.nix pkgs/development/libraries/glibc/2.17/builder.sh pkgs/development/libraries/glibc/2.17/locales.nix pkgs/development/libraries/libjpeg/default.nix pkgs/development/libraries/libogg/default.nix pkgs/development/libraries/libsamplerate/default.nix pkgs/development/libraries/libtiff/default.nix pkgs/development/libraries/libvorbis/default.nix pkgs/development/libraries/mesa/default.nix pkgs/development/libraries/pango/default.nix pkgs/development/web/nodejs/default.nix pkgs/os-specific/linux/pam/default.nix pkgs/os-specific/linux/systemd/default.nix pkgs/stdenv/generic/setup.sh pkgs/stdenv/linux/default.nix pkgs/top-level/all-packages.nix pkgs/top-level/release-small.nix
This commit is contained in:
@@ -12,7 +12,7 @@ diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypt
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/x509.h>
|
||||
@@ -71,7 +75,19 @@
|
||||
@@ -71,7 +75,25 @@
|
||||
{ return(X509_CERT_DIR); }
|
||||
|
||||
const char *X509_get_default_cert_file(void)
|
||||
@@ -23,9 +23,15 @@ diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypt
|
||||
+ if (!init) {
|
||||
+ init = 1;
|
||||
+ char * s = getenv("OPENSSL_X509_CERT_FILE");
|
||||
+ if (s && getuid() == geteuid()) {
|
||||
+ strncpy(buf, s, sizeof(buf));
|
||||
+ buf[sizeof(buf) - 1] = 0;
|
||||
+ if (s) {
|
||||
+#ifndef OPENSSL_SYS_WINDOWS
|
||||
+ if (getuid() == geteuid()) {
|
||||
+#endif
|
||||
+ strncpy(buf, s, sizeof(buf));
|
||||
+ buf[sizeof(buf) - 1] = 0;
|
||||
+#ifndef OPENSSL_SYS_WINDOWS
|
||||
+ }
|
||||
+#endif
|
||||
+ }
|
||||
+ }
|
||||
+ return buf;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user