|
448 | 448 | # Takes a zlib derivation and overrides it to have both .a and .so files. |
449 | 449 | statify_zlib = zlib_drv: |
450 | 450 | (zlib_drv.override { |
451 | | - static = false; |
452 | 451 | shared = true; |
| 452 | + static = true; |
| 453 | + splitStaticOutput = false; |
453 | 454 | }).overrideAttrs (old: { dontDisableStatic = true; }); |
454 | 455 |
|
455 | 456 | # Takes a curl derivation and overrides it to have both .a and .so files, |
|
552 | 553 | patchelf_static = previous.patchelf.overrideAttrs (old: { dontDisableStatic = true; }); |
553 | 554 | pcre_static = previous.pcre.overrideAttrs (old: { dontDisableStatic = true; }); |
554 | 555 | xz_static = previous.xz.overrideAttrs (old: { dontDisableStatic = true; }); |
555 | | - # TODO All 3 zlibs below can be simplified/removed once https://github.com/NixOS/nixpkgs/pull/66490 is available |
556 | | - zlib_static = (previous.zlib.override { |
557 | | - static = true; |
558 | | - shared = true; |
559 | | - # If both `static` and `dynamic` are enabled, then the zlib package |
560 | | - # puts the static libs into the `.static` split-output. |
561 | | - }).static; |
562 | | - zlib_static_only = (previous.zlib.override { |
563 | | - static = true; |
564 | | - shared = false; |
565 | | - }); |
566 | 556 | zlib_both = statify_zlib previous.zlib; |
567 | 557 | # Also override the original packages with a throw (which as of writing |
568 | 558 | # has no effect) so we can know when the bug gets fixed in the future. |
@@ -1106,7 +1096,7 @@ let |
1106 | 1096 | statify = drv: with final.haskell.lib; final.lib.foldl appendConfigureFlag (disableLibraryProfiling (disableSharedExecutables (useFixedCabal drv))) ([ |
1107 | 1097 | "--enable-executable-static" # requires `useFixedCabal` |
1108 | 1098 | # TODO These probably shouldn't be here but only for packages that actually need them |
1109 | | - "--extra-lib-dirs=${if approach == "pkgsMusl" then final.zlib_static else final.zlib}/lib" |
| 1099 | + "--extra-lib-dirs=${if approach == "pkgsMusl" then final.zlib_both else final.zlib}/lib" |
1110 | 1100 | "--extra-lib-dirs=${final.ncurses.override { enableStatic = true; }}/lib" |
1111 | 1101 | # TODO Figure out why this and the below libffi are necessary. |
1112 | 1102 | # `working` and `workingStackageExecutables` don't seem to need that, |
|
0 commit comments