Skip to content

Commit

Permalink
fetchurl: Don't force-override curl's gssSupport to on. Fixes #66499.
Browse files Browse the repository at this point in the history
The original intent in commit

    a1fec86 treewide: assemble all `fetchurlBoot` uses in overrides to `fetchurl` itself

was to turn `gssSupport` *off* on Darwin, but the code actually also forced
it *on* on Linux.
This resulted in previous (e.g. overlays) `.override { gssSupport = false; }`
being ignored (#66499).

This commit fixes it by just respecting the old value when it doesn't need
to be forced to off.
  • Loading branch information
nh2 committed Aug 12, 2019
1 parent c78fead commit b7dfc72
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ in
# `fetchurl' downloads a file from the network.
fetchurl = makeOverridable (import ../build-support/fetchurl) {
inherit lib stdenvNoCC;
curl = buildPackages.curl.override rec {
curl = buildPackages.curl.override (old: rec {
# break dependency cycles
fetchurl = stdenv.fetchurlBoot;
zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; };
Expand All @@ -292,7 +292,12 @@ in
};
# On darwin, libkrb5 needs bootstrap_cmds which would require
# converting many packages to fetchurl_boot to avoid evaluation cycles.
gssSupport = !stdenv.isDarwin && !stdenv.hostPlatform.isWindows;
# So turn gssSupport off there, and on Windows.
# On other platforms, keep the previous value.
gssSupport =
if stdenv.isDarwin || stdenv.hostPlatform.isWindows
then false
else old.gssSupport or true; # `? true` is the default
libkrb5 = buildPackages.libkrb5.override {
fetchurl = stdenv.fetchurlBoot;
inherit pkgconfig perl openssl;
Expand All @@ -304,7 +309,7 @@ in
c-ares = buildPackages.c-ares.override { fetchurl = stdenv.fetchurlBoot; };
libev = buildPackages.libev.override { fetchurl = stdenv.fetchurlBoot; };
};
};
});
};

fetchRepoProject = callPackage ../build-support/fetchrepoproject { };
Expand Down

0 comments on commit b7dfc72

Please sign in to comment.