From cb37ab146b6578b540cead3ef1ec282f4de975a7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 May 2016 15:49:44 +0200 Subject: [PATCH] Add mirror://mozilla scheme --- pkgs/applications/networking/browsers/firefox/default.nix | 2 +- .../networking/mailreaders/thunderbird/default.nix | 5 ++--- pkgs/build-support/fetchurl/mirrors.nix | 7 +++++++ pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix | 4 ++-- pkgs/development/interpreters/spidermonkey/17.0.nix | 2 +- pkgs/development/interpreters/spidermonkey/185-1.0.0.nix | 2 +- pkgs/development/interpreters/spidermonkey/24.2.nix | 2 +- pkgs/development/interpreters/spidermonkey/default.nix | 2 +- pkgs/development/libraries/java/rhino/default.nix | 2 +- pkgs/development/libraries/nspr/default.nix | 2 +- pkgs/development/libraries/nss/default.nix | 2 +- pkgs/development/libraries/svrcore/default.nix | 2 +- 12 files changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix index 41e1ac560bf4..a3c8183fff22 100644 --- a/pkgs/applications/networking/browsers/firefox/default.nix +++ b/pkgs/applications/networking/browsers/firefox/default.nix @@ -24,7 +24,7 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec { src = fetchurl { url = let ext = if lib.versionAtLeast version "41.0" then "xz" else "bz2"; - in "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${version}/source/firefox-${version}.source.tar.${ext}"; + in "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.${ext}"; inherit sha512; }; diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix index b3a3c2bf8614..27b9d335e27c 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix @@ -20,9 +20,8 @@ stdenv.mkDerivation rec { name = "thunderbird-${verName}"; src = fetchurl { - url = "http://archive.mozilla.org/pub/thunderbird/releases/" - + "${verName}/source/thunderbird-${verName}.source.tar.xz"; - sha256 = "0rynfyxgpvfla17zniaq84slc02kg848qawkjmdbnv74y6bkhs8m"; + url = "mirror://mozilla/thunderbird/releases/${verName}/source/thunderbird-${verName}.source.tar.xz"; + sha256 = "1wbkj8a0p62mcbxlq8yyzrx51xi65qm8f2ccqiv5pb6qd51b5d0v"; }; buildInputs = # from firefox30Pkgs.xulrunner, without gstreamer and libvpx diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index 6de94ab511b5..47b721b030d5 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -345,4 +345,11 @@ rec { pypi = [ https://pypi.io/packages/source/ ]; + + # Mozilla projects. + mozilla = [ + http://download.cdn.mozilla.net/pub/mozilla.org/ + https://archive.mozilla.org/pub/ + ]; + } diff --git a/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix b/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix index 99f66199d939..960cd86ec27f 100644 --- a/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix +++ b/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix @@ -3,9 +3,9 @@ stdenv.mkDerivation rec { version = "1.8.0-rc1"; name = "spidermonkey-${version}"; - + src = fetchurl { - url = "http://ftp.mozilla.org/pub/mozilla.org/js/js-${version}.tar.gz"; + url = "mirror://mozilla/js/js-${version}.tar.gz"; sha256 = "374398699ac3fd802d98d642486cf6b0edc082a119c9c9c499945a0bc73e3413"; }; diff --git a/pkgs/development/interpreters/spidermonkey/17.0.nix b/pkgs/development/interpreters/spidermonkey/17.0.nix index 5cc71b59d512..cbe2c47594d4 100644 --- a/pkgs/development/interpreters/spidermonkey/17.0.nix +++ b/pkgs/development/interpreters/spidermonkey/17.0.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { name = "spidermonkey-${version}"; src = fetchurl { - url = "http://ftp.mozilla.org/pub/mozilla.org/js/mozjs${version}.tar.gz"; + url = "mirror://mozilla/js/mozjs${version}.tar.gz"; sha256 = "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij"; }; diff --git a/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix b/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix index 94f070d1a91d..779f0ef26d45 100644 --- a/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix +++ b/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { name = "spidermonkey-${version}"; src = fetchurl { - url = "http://ftp.mozilla.org/pub/mozilla.org/js/js${version}.tar.gz"; + url = "mirror://mozilla/js/js${version}.tar.gz"; sha256 = "5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687"; }; diff --git a/pkgs/development/interpreters/spidermonkey/24.2.nix b/pkgs/development/interpreters/spidermonkey/24.2.nix index 5c4fc8508155..96d73b69e626 100644 --- a/pkgs/development/interpreters/spidermonkey/24.2.nix +++ b/pkgs/development/interpreters/spidermonkey/24.2.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { name = "spidermonkey-${version}"; src = fetchurl { - url = "http://ftp.mozilla.org/pub/mozilla.org/js/mozjs-${version}.tar.bz2"; + url = "mirror://mozilla/js/mozjs-${version}.tar.bz2"; sha256 = "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"; }; diff --git a/pkgs/development/interpreters/spidermonkey/default.nix b/pkgs/development/interpreters/spidermonkey/default.nix index 1ef0cf3b5398..21ba0b8cba48 100644 --- a/pkgs/development/interpreters/spidermonkey/default.nix +++ b/pkgs/development/interpreters/spidermonkey/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "spidermonkey-1.7"; src = fetchurl { - url = https://ftp.mozilla.org/pub/js/js-1.7.0.tar.gz; + url = mirror://mozilla/js/js-1.7.0.tar.gz; sha256 = "12v6v2ccw1y6ng3kny3xw0lfs58d1klylqq707k0x04m707kydj4"; }; diff --git a/pkgs/development/libraries/java/rhino/default.nix b/pkgs/development/libraries/java/rhino/default.nix index 87958512925f..960af32d359b 100644 --- a/pkgs/development/libraries/java/rhino/default.nix +++ b/pkgs/development/libraries/java/rhino/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { name = "rhino-${version}"; src = fetchurl { - url = "https://ftp.mozilla.org/pub/js/rhino1_7R2.zip"; + url = "mirror://mozilla/js/rhino1_7R2.zip"; sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7"; }; diff --git a/pkgs/development/libraries/nspr/default.nix b/pkgs/development/libraries/nspr/default.nix index 726b5d7b29af..23f7ffb0ce89 100644 --- a/pkgs/development/libraries/nspr/default.nix +++ b/pkgs/development/libraries/nspr/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { name = "nspr-${version}"; src = fetchurl { - url = "http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${version}/src/nspr-${version}.tar.gz"; + url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz"; sha256 = "1pk98bmc5xzbl62q5wf2d6mryf0v95z6rsmxz27nclwiaqg0mcg0"; }; diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index fc5bffe6b740..c95e2304e40f 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -12,7 +12,7 @@ in stdenv.mkDerivation rec { version = "3.23"; src = fetchurl { - url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_23_RTM/src/${name}.tar.gz"; + url = "mirror://mozilla/security/nss/releases/NSS_3_23_RTM/src/${name}.tar.gz"; sha256 = "1kqidv91icq96m9m8zx50n7px08km2l88458rkgyjwcn3kiq7cwl"; }; diff --git a/pkgs/development/libraries/svrcore/default.nix b/pkgs/development/libraries/svrcore/default.nix index a5559e87aadb..ddb880e6bf27 100644 --- a/pkgs/development/libraries/svrcore/default.nix +++ b/pkgs/development/libraries/svrcore/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "4.0.4"; src = fetchurl { - url = "https://ftp.mozilla.org/pub/directory/svrcore/releases/${version}/src/${name}.tar.bz2"; + url = "mirror://mozilla/directory/svrcore/releases/${version}/src/${name}.tar.bz2"; sha256 = "0n3alg6bxml8952fb6h0bi0l29farvq21q6k20gy2ba90m3znwj7"; };