haskell: add more hackage mirrors, use mirrors in more places

Fixes #58971
This commit is contained in:
Matthew Bauer
2019-04-05 13:49:48 -04:00
parent e03966a60f
commit eaa5e85b35
4 changed files with 6 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ let
binDir = if enableSeparateBinOutput then "$bin/bin" else "$out/bin";
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
newCabalFileUrl = "mirror://hackage/${pname}-${version}/revision/${revision}.cabal";
newCabalFile = fetchurl {
url = newCabalFileUrl;
sha256 = editedCabalFile;

View File

@@ -183,7 +183,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
callHackageDirect = {pkg, ver, sha256}@args:
let pkgver = "${pkg}-${ver}";
in self.callCabal2nix pkg (pkgs.fetchzip {
url = "http://hackage.haskell.org/package/${pkgver}/${pkgver}.tar.gz";
url = "mirror://hackage/${pkgver}/${pkgver}.tar.gz";
inherit sha256;
});