Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

fetchurl: Eliminate pointless cross differences

+6 -4
+2 -2
pkgs/build-support/fetchurl/default.nix
··· 1 - { lib, stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC. 1 + { lib, buildPackages ? { inherit stdenvNoCC; }, stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC. 2 2 3 3 let 4 4 ··· 10 10 # resulting store derivations (.drv files) much smaller, which in 11 11 # turn makes nix-env/nix-instantiate faster. 12 12 mirrorsFile = 13 - stdenvNoCC.mkDerivation ({ 13 + buildPackages.stdenvNoCC.mkDerivation ({ 14 14 name = "mirrors-list"; 15 15 builder = ./write-mirror-list.sh; 16 16 preferLocalBuild = true;
+4 -2
pkgs/top-level/all-packages.nix
··· 283 283 fetchhg = callPackage ../build-support/fetchhg { }; 284 284 285 285 # `fetchurl' downloads a file from the network. 286 - fetchurl = makeOverridable (import ../build-support/fetchurl) { 287 - inherit lib stdenvNoCC; 286 + fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform 287 + then buildPackages.fetchurl # No need to do special overrides twice, 288 + else makeOverridable (import ../build-support/fetchurl) { 289 + inherit lib stdenvNoCC buildPackages; 288 290 curl = buildPackages.curl.override (old: rec { 289 291 # break dependency cycles 290 292 fetchurl = stdenv.fetchurlBoot;