Merge pull request #43870 from nh2/static-krb5-openssl-flags

Optional static libraries for krb5 and openssl
This commit is contained in:
Matthew Bauer
2018-07-23 17:31:24 -04:00
committed by GitHub
2 changed files with 12 additions and 2 deletions
@@ -2,6 +2,7 @@
, buildPlatform, hostPlatform
, withCryptodev ? false, cryptodevHeaders
, enableSSL2 ? false
, static ? false
}:
with stdenv.lib;
@@ -63,7 +64,7 @@ let
'';
configureFlags = [
"shared"
"shared" # "shared" builds both shared and static libraries
"--libdir=lib"
"--openssldir=etc/ssl"
] ++ stdenv.lib.optionals withCryptodev [
@@ -76,13 +77,16 @@ let
enableParallelBuilding = true;
postInstall = ''
postInstall =
stdenv.lib.optionalString (!static) ''
# If we're building dynamic libraries, then don't install static
# libraries.
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
rm "$out/lib/"*.a
fi
'' +
''
mkdir -p $bin
mv $out/bin $bin/