Merge pull request #33399 from obsidiansystems/ghc-normalize

GHC: Normalize derivations is a few simple-hash preserving ways
This commit is contained in:
John Ericson 2018-01-03 17:36:22 -05:00 committed by GitHub
commit 25aff92280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 14 additions and 19 deletions

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
name = "ghc-${version}";
src = fetchurl {
url = "${meta.homepage}/dist/${version}/${name}-src.tar.bz2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "d66a8e52572f4ff819fe5c4e34c6dd1e84a7763e25c3fadcc222453c0bd8534d";
};

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
name = "ghc-${version}";
src = fetchurl {
url = "http://darcs.haskell.org/download/dist/${version}/${name}-src.tar.bz2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "0s2y1sv2nq1cgliv735q2w3gg4ykv1c0g1adbv8wgwhia10vxgbc";
};

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
name = "ghc-${version}";
src = fetchurl {
url = "http://haskell.org/ghc/dist/${version}/${name}-src.tar.bz2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed";
};

View File

@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
postInstall = ''
# Install the bash completion file.

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
name = "ghc-${version}";
src = fetchurl {
url = "http://haskell.org/ghc/dist/${version}/${name}-src.tar.bz2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "0g87d3z9275dniaqzkf56qfgzp1msd89nqqhhm2gkc6iga072spz";
};

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
name = "ghc-${version}";
src = fetchurl {
url = "http://haskell.org/ghc/dist/7.4.2/${name}-src.tar.bz2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "0vc3zmxqi4gflssmj35n5c8idbvyrhd88abi50whbirwlf4i5vpj";
};

View File

@ -22,7 +22,7 @@ in stdenv.mkDerivation rec {
name = "ghc-${version}";
src = fetchurl {
url = "http://haskell.org/ghc/dist/${version}/${name}-src.tar.bz2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2";
sha256 = "1669m8k9q72rpd2mzs0bh2q6lcwqiwd1ax3vrard1dgn64yq4hxx";
};

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation (rec {
name = "ghc-${version}";
src = fetchurl {
url = "http://www.haskell.org/ghc/dist/7.8.4/${name}-src.tar.xz";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "1i4254akbb4ym437rf469gc0m40bxm31blp6s1z1g15jmnacs6f3";
};

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/8.0.2/ghc-${version}-src.tar.xz";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "1c8qc4fhkycynk4g1f9hvk53dj6a1vvqi6bklqznns6hw59m8qhi";
};
@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
postInstall = ''
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}

View File

@ -17,7 +17,6 @@ assert !enableIntegerSimple -> gmp != null;
let
inherit (bootPkgs) ghc;
version = "8.2.2";
# TODO(@Ericson2314) Make unconditional
targetPrefix = stdenv.lib.optionalString
@ -25,11 +24,11 @@ let
"${targetPlatform.config}-";
in
stdenv.mkDerivation (rec {
inherit version;
name = "ghc-${version}";
version = "8.2.2";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/8.2.2/${name}-src.tar.xz";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "1z05vkpaj54xdypmaml50hgsdpw29dhbs2r7magx0cm199iw73mv";
};
@ -100,8 +99,6 @@ stdenv.mkDerivation (rec {
};
} // stdenv.lib.optionalAttrs (cross != null) {
name = "${cross.config}-ghc-${version}";
configureFlags = [
"CC=${stdenv.cc}/bin/${cross.config}-cc"
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"

View File

@ -29,7 +29,7 @@ let
in
stdenv.mkDerivation (rec {
inherit version rev;
name = "ghc-${version}";
name = "${targetPrefix}ghc-${version}";
src = fetchgit {
url = "git://git.haskell.org/ghc.git";
@ -107,8 +107,6 @@ stdenv.mkDerivation (rec {
};
} // stdenv.lib.optionalAttrs (cross != null) {
name = "${cross.config}-ghc-${version}";
configureFlags = [
"CC=${stdenv.cc}/bin/${cross.config}-cc"
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"