@@ -9,7 +9,15 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
9
9
zlib = prev . zlib . override { splitStaticOutput = false ; } ;
10
10
11
11
# and a few more packages that need their static libs explicitly enabled
12
- bzip2 = prev . bzip2 . override { enableStatic = true ; } ;
12
+ bzip2 = prev . bzip2 . override (
13
+ # This option was renamed to `enableStatic`, to be more consistent with packages with a similar
14
+ # static toggles. However, it now correctly defaults to true when `hostPlatform.isStatic` is true.
15
+ if builtins . compareVersions prev . lib . trivial . release "23.11" < 0
16
+ then { linkStatic = true ; }
17
+ else {
18
+ # `isMusl` does not always mean `isStatic`, so setting `enableStatic` to true here.
19
+ enableStatic = true ;
20
+ } ) ;
13
21
gmp = prev . gmp . override { withStatic = true ; } ;
14
22
ncurses = prev . ncurses . override { enableStatic = true ; } ;
15
23
libsodium = prev . libsodium . overrideAttrs ( _ : { dontDisableStatic = true ; } ) ;
@@ -40,8 +48,4 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
40
48
} // prev . lib . optionalAttrs ( prev . lib . versionAtLeast prev . lib . trivial . release "20.03" ) {
41
49
# Fix infinite recursion between openssh and fetchcvs
42
50
openssh = prev . openssh . override { withFIDO = false ; } ;
43
- } // prev . lib . optionalAttrs ( prev . lib . versionOlder prev . lib . trivial . release "23.11" ) {
44
- # This option was renamed to enableStatic, to be more consistent with packages with a similar
45
- # static toggles. However, it now correctly defaults to true when `hostPlatform.isStatic` is true.
46
- bzip2 = prev . bzip2 . override { linkStatic = true ; } ;
47
51
} )
0 commit comments