|
|
@ -7,6 +7,7 @@ |
|
|
|
# This will cause c_rehash to refer to perl via the environment, but otherwise |
|
|
|
# This will cause c_rehash to refer to perl via the environment, but otherwise |
|
|
|
# will produce a perfectly functional openssl binary and library. |
|
|
|
# will produce a perfectly functional openssl binary and library. |
|
|
|
, withPerl ? stdenv.hostPlatform == stdenv.buildPlatform |
|
|
|
, withPerl ? stdenv.hostPlatform == stdenv.buildPlatform |
|
|
|
|
|
|
|
, removeReferencesTo |
|
|
|
}: |
|
|
|
}: |
|
|
|
|
|
|
|
|
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus |
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus |
|
|
@ -112,7 +113,11 @@ let |
|
|
|
# OpenSSL needs a specific `no-shared` configure flag. |
|
|
|
# OpenSSL needs a specific `no-shared` configure flag. |
|
|
|
# See https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_Options |
|
|
|
# See https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_Options |
|
|
|
# for a comprehensive list of configuration options. |
|
|
|
# for a comprehensive list of configuration options. |
|
|
|
++ lib.optional (lib.versionAtLeast version "1.1.0" && static) "no-shared"; |
|
|
|
++ lib.optional (lib.versionAtLeast version "1.1.0" && static) "no-shared" |
|
|
|
|
|
|
|
# This introduces a reference to the CTLOG_FILE which is undesired when |
|
|
|
|
|
|
|
# trying to build binaries statically. |
|
|
|
|
|
|
|
++ lib.optional static "no-ct" |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
makeFlags = [ |
|
|
|
makeFlags = [ |
|
|
|
"MANDIR=$(man)/share/man" |
|
|
|
"MANDIR=$(man)/share/man" |
|
|
@ -126,13 +131,16 @@ let |
|
|
|
enableParallelBuilding = true; |
|
|
|
enableParallelBuilding = true; |
|
|
|
|
|
|
|
|
|
|
|
postInstall = |
|
|
|
postInstall = |
|
|
|
lib.optionalString (!static) '' |
|
|
|
(if static then '' |
|
|
|
|
|
|
|
# OPENSSLDIR has a reference to self |
|
|
|
|
|
|
|
${removeReferencesTo}/bin/remove-references-to -t $out $out/lib/*.a |
|
|
|
|
|
|
|
'' else '' |
|
|
|
# If we're building dynamic libraries, then don't install static |
|
|
|
# If we're building dynamic libraries, then don't install static |
|
|
|
# libraries. |
|
|
|
# libraries. |
|
|
|
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then |
|
|
|
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then |
|
|
|
rm "$out/lib/"*.a |
|
|
|
rm "$out/lib/"*.a |
|
|
|
fi |
|
|
|
fi |
|
|
|
'' + lib.optionalString (!stdenv.hostPlatform.isWindows) |
|
|
|
'') + lib.optionalString (!stdenv.hostPlatform.isWindows) |
|
|
|
# Fix bin/c_rehash's perl interpreter line |
|
|
|
# Fix bin/c_rehash's perl interpreter line |
|
|
|
# |
|
|
|
# |
|
|
|
# - openssl 1_0_2: embeds a reference to buildPackages.perl |
|
|
|
# - openssl 1_0_2: embeds a reference to buildPackages.perl |
|
|
|