fetchurl: Eliminate pointless cross differences
This commit is contained in:
parent
3f74a4d066
commit
38ebb8ff82
|
@ -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
|
let
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
# resulting store derivations (.drv files) much smaller, which in
|
# resulting store derivations (.drv files) much smaller, which in
|
||||||
# turn makes nix-env/nix-instantiate faster.
|
# turn makes nix-env/nix-instantiate faster.
|
||||||
mirrorsFile =
|
mirrorsFile =
|
||||||
stdenvNoCC.mkDerivation ({
|
buildPackages.stdenvNoCC.mkDerivation ({
|
||||||
name = "mirrors-list";
|
name = "mirrors-list";
|
||||||
builder = ./write-mirror-list.sh;
|
builder = ./write-mirror-list.sh;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
|
|
@ -283,8 +283,10 @@ in
|
||||||
fetchhg = callPackage ../build-support/fetchhg { };
|
fetchhg = callPackage ../build-support/fetchhg { };
|
||||||
|
|
||||||
# `fetchurl' downloads a file from the network.
|
# `fetchurl' downloads a file from the network.
|
||||||
fetchurl = makeOverridable (import ../build-support/fetchurl) {
|
fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform
|
||||||
inherit lib stdenvNoCC;
|
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 {
|
curl = buildPackages.curl.override (old: rec {
|
||||||
# break dependency cycles
|
# break dependency cycles
|
||||||
fetchurl = stdenv.fetchurlBoot;
|
fetchurl = stdenv.fetchurlBoot;
|
||||||
|
|
Loading…
Reference in New Issue