diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 46ba25f8603b3b1..711cab7092009dc 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -28,7 +28,7 @@ in rec { cctools_ = darwin.cctools; # Avoid debugging larger changes for now. - bzip2_ = bzip2.override (args: { linkStatic = true; }); + bzip2_ = bzip2.override (args: { enableStatic = true; disableShared = true; }); # 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 be456cf59442777..8a73d2f4c2acb0d 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 +, disableShared ? false , autoreconfHook , testers }: @@ -48,7 +49,10 @@ in { outputs = [ "bin" "dev" "out" "man" ]; configureFlags = - lib.optionals linkStatic [ "--enable-static" "--disable-shared" ]; + lib.optional enableStatic "--enable-static" ++ + lib.optional disableShared "--disable-shared"; + + dontDisableStatic = if enableStatic then true else null; # null to not cause rebuild vs historic versions that didn't have the attribute at all enableParallelBuilding = true;