diff options
author | Niklas Hambüchen <mail@nh2.me> | 2023-06-12 23:51:59 +0000 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2023-10-20 19:59:30 +0000 |
commit | e73b7f8d63d2f940ab8110001942b5491d07fd28 (patch) | |
tree | 72a4c3ddc4691cdb77d053cede1626e7e58b261a | |
parent | 011075578a59fff9164bf6e6366c99c7cce74067 (diff) |
bzip2: Add `enableStatic`. See #61575
-rw-r--r-- | pkgs/stdenv/darwin/make-bootstrap-tools.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/compression/bzip2/default.nix | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 9c580447a6f43..bf6a3fb96a795 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -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; }); diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index be456cf594427..bfab2dbb94670 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -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; |