fetchurl: Eliminate pointless cross differences

This commit is contained in:
John Ericson 2019-10-27 20:05:48 -04:00
parent 3f74a4d066
commit 38ebb8ff82
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ lib, stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC.
{ lib, buildPackages ? { inherit stdenvNoCC; }, stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC.
let
@ -10,7 +10,7 @@ let
# resulting store derivations (.drv files) much smaller, which in
# turn makes nix-env/nix-instantiate faster.
mirrorsFile =
stdenvNoCC.mkDerivation ({
buildPackages.stdenvNoCC.mkDerivation ({
name = "mirrors-list";
builder = ./write-mirror-list.sh;
preferLocalBuild = true;

View File

@ -283,8 +283,10 @@ in
fetchhg = callPackage ../build-support/fetchhg { };
# `fetchurl' downloads a file from the network.
fetchurl = makeOverridable (import ../build-support/fetchurl) {
inherit lib stdenvNoCC;
fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform
then buildPackages.fetchurl # No need to do special overrides twice,
else makeOverridable (import ../build-support/fetchurl) {
inherit lib stdenvNoCC buildPackages;
curl = buildPackages.curl.override (old: rec {
# break dependency cycles
fetchurl = stdenv.fetchurlBoot;