Skip to content

Commit 8cbca2c

Browse files
nh2teggotic
authored andcommitted
bzip2: Add enableStatic. See NixOS#61575
nixpkgs upstreaming PR: NixOS#243161
1 parent 8f15619 commit 8cbca2c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pkgs/stdenv/darwin/make-bootstrap-tools.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in rec {
2828
cctools_ = darwin.cctools;
2929

3030
# Avoid debugging larger changes for now.
31-
bzip2_ = bzip2.override (args: { linkStatic = true; });
31+
bzip2_ = bzip2.override (args: { enableStatic = true; disableShared = true; });
3232

3333
# Avoid messing with libkrb5 and libnghttp2.
3434
curl_ = curlMinimal.override (args: { gssSupport = false; http2Support = false; });

pkgs/tools/compression/bzip2/default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{ lib, stdenv, fetchurl
2-
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
2+
, enableStatic ? with stdenv.hostPlatform; isStatic || isCygwin
3+
, disableShared ? false
34
, autoreconfHook
45
, testers
56
}:
@@ -48,7 +49,10 @@ in {
4849
outputs = [ "bin" "dev" "out" "man" ];
4950

5051
configureFlags =
51-
lib.optionals linkStatic [ "--enable-static" "--disable-shared" ];
52+
lib.optional enableStatic "--enable-static" ++
53+
lib.optional disableShared "--disable-shared";
54+
55+
dontDisableStatic = if enableStatic then true else null; # null to not cause rebuild vs historic versions that didn't have the attribute at all
5256

5357
enableParallelBuilding = true;
5458

0 commit comments

Comments
 (0)