diff options
Diffstat (limited to 'pkgs/development/libraries/openssl/default.nix')
-rw-r--r-- | pkgs/development/libraries/openssl/default.nix | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 640b99df547..6a3beee80de 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -46,6 +46,10 @@ stdenv.mkDerivation { patches = patchesCross false; + outputs = [ "dev" "out" "man" "bin" ]; + + setOutputConfigureFlags = false; + buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders; nativeBuildInputs = [ perl ]; @@ -58,7 +62,7 @@ stdenv.mkDerivation { configureFlags = "shared --libdir=lib --openssldir=etc/ssl" + stdenv.lib.optionalString withCryptodev " -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"; - makeFlags = "MANDIR=$(out)/share/man"; + makeFlags = "MANDIR=$(man)/share/man"; # Parallel building is broken in OpenSSL. #enableParallelBuilding = true; @@ -70,6 +74,18 @@ stdenv.mkDerivation { if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib)" ]; then rm $out/lib/*.a fi + + mkdir -p $bin + mv $out/bin $bin/ + + rm -rf $out/etc/ssl/misc + + mkdir $dev + mv $out/include $dev/ + + # OpenSSL installs readonly files, which otherwise we can't strip. + # FIXME: Can remove this after the next stdenv merge. + chmod -R +w $out ''; # */ crossAttrs = { @@ -80,14 +96,6 @@ stdenv.mkDerivation { export configureFlags="--libdir=lib --cross-compile-prefix=${stdenv.cross.config}- shared ${opensslCrossSystem}" ''; - postInstall = '' - # Openssl installs readonly files, which otherwise we can't strip. - # This could at some stdenv hash change be put out of crossAttrs, too - chmod -R +w $out - - # Remove references to perl, to avoid depending on it at runtime - rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget - ''; configureScript = "./Configure"; }; |