bzip2: Add enableStatic. See #61575

This commit is contained in:
Niklas Hambüchen 2023-06-12 23:51:59 +00:00
parent 011075578a
commit e73b7f8d63
2 changed files with 9 additions and 4 deletions

View File

@ -29,7 +29,7 @@ in rec {
cctools_ = darwin.cctools;
# Avoid debugging larger changes for now.
bzip2_ = bzip2.override (args: { linkStatic = true; });
bzip2_ = bzip2.override (args: { enableStatic = true; enableShared = false; });
# Avoid messing with libkrb5 and libnghttp2.
curl_ = curlMinimal.override (args: { gssSupport = false; http2Support = false; });

View File

@ -1,5 +1,6 @@
{ lib, stdenv, fetchurl
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
, enableStatic ? with stdenv.hostPlatform; isStatic || isCygwin
, enableShared ? true
, autoreconfHook
, testers
}:
@ -47,8 +48,12 @@ in {
outputs = [ "bin" "dev" "out" "man" ];
configureFlags =
lib.optionals linkStatic [ "--enable-static" "--disable-shared" ];
configureFlags = lib.concatLists [
(lib.optional enableStatic "--enable-static")
(lib.optional (!enableShared) "--disable-shared")
];
dontDisableStatic = enableStatic;
enableParallelBuilding = true;