Skip to content

Commit 5a736a3

Browse files
committed
Fix fetchurl pulling in correct curl but incorrect zlib
1 parent c1a7368 commit 5a736a3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

survey/default.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,20 @@ let
665665
# so that `curl` can use it.
666666
curl = statify_curl_including_exe previous.curl final.zlib_both;
667667

668+
# `fetchurl` uses our overridden `curl` above, but `fetchurl` overrides
669+
# `zlib` in `curl`, see
670+
# https://github.com/NixOS/nixpkgs/blob/4a5c0e029ddbe89aa4eb4da7949219fe4e3f8472/pkgs/top-level/all-packages.nix#L296-L299
671+
# so because of [Packages that can't be overridden by overlays],
672+
# it will undo our `zlib` override in `curl` done above (for `curl`
673+
# use via `fetchurl`).
674+
# So we need to explicitly put our zlib into that one's curl here.
675+
fetchurl = previous.fetchurl.override (old: {
676+
# Can't use `zlib_both` here (infinite recursion), so we
677+
# re-`statify_zlib` `final.zlib` here (interesting that
678+
# `previous.zlib` also leads to infinite recursion at time of writing).
679+
curl = old.curl.override { zlib = statify_zlib final.zlib; };
680+
});
681+
668682
};
669683

670684

0 commit comments

Comments
 (0)