Skip to content

Commit 5ce4477

Browse files
committed
Use zlib_both for building curl.
Fixes that in latest nixpkgs master, the curl build sees the old, unoverridden zlib, even though we passed in an overridden one. https://buildkite.com/nh2/static-haskell-nix/builds/113#3551cfdf-fe73-4a75-a6dc-1cd3ae430860
1 parent 30d1eeb commit 5ce4477

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

survey/default.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ let
465465

466466
# Takes a curl derivation and overrides it to have both .a and .so files,
467467
# and have the `curl` executable be statically linked.
468-
statify_curl_including_exe = curl_drv:
468+
statify_curl_including_exe = curl_drv: zlib_both:
469469
(curl_drv.override (old: {
470470
# Disable gss support, because that requires `krb5`, which
471471
# (as mentioned in note [krb5 can only be static XOR shared]) is a
@@ -474,7 +474,7 @@ let
474474
# dynamically-linked `curl` binary from the overlay
475475
# `archiveFilesOverlay` below where `statify_curl_including_exe` is used.
476476
gssSupport = false;
477-
zlib = statify_zlib old.zlib;
477+
zlib = zlib_both;
478478
})).overrideAttrs (old: {
479479
dontDisableStatic = true;
480480

@@ -660,7 +660,10 @@ let
660660
};
661661

662662
# See comments on `statify_curl_including_exe` for the interaction with krb5!
663-
curl = statify_curl_including_exe previous.curl;
663+
# As mentioned in [Packages that can't be overridden by overlays], we can't
664+
# override zlib to have static libs, so we have to pass in `zlib_both` explicitly
665+
# so that `curl` can use it.
666+
curl = statify_curl_including_exe previous.curl final.zlib_both;
664667

665668
};
666669

0 commit comments

Comments
 (0)