Skip to content

Commit

Permalink
bzip2: Add enableStatic. See #61575
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed Oct 20, 2023
1 parent 0110755 commit e73b7f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkgs/stdenv/darwin/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; });
Expand Down
11 changes: 8 additions & 3 deletions pkgs/tools/compression/bzip2/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib, stdenv, fetchurl
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
, enableStatic ? with stdenv.hostPlatform; isStatic || isCygwin
, enableShared ? true
, autoreconfHook
, testers
}:
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit e73b7f8

Please sign in to comment.