mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
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
|
||||
|
||||
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user