ghc: Normalize derivations in hash-preserving ways
This commit is contained in:
parent
0df29e1259
commit
3fb5fd0060
@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||||
# that in turn causes GHCi to abort
|
# 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 = ''
|
postInstall = ''
|
||||||
# Install the bash completion file.
|
# Install the bash completion file.
|
||||||
|
@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||||
# that in turn causes GHCi to abort
|
# 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 = ''
|
postInstall = ''
|
||||||
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
|
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
|
||||||
|
@ -17,7 +17,6 @@ assert !enableIntegerSimple -> gmp != null;
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
version = "8.2.2";
|
|
||||||
|
|
||||||
# TODO(@Ericson2314) Make unconditional
|
# TODO(@Ericson2314) Make unconditional
|
||||||
targetPrefix = stdenv.lib.optionalString
|
targetPrefix = stdenv.lib.optionalString
|
||||||
@ -25,8 +24,8 @@ let
|
|||||||
"${targetPlatform.config}-";
|
"${targetPlatform.config}-";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation (rec {
|
||||||
inherit version;
|
version = "8.2.2";
|
||||||
name = "ghc-${version}";
|
name = "${targetPrefix}ghc-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
|
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
|
||||||
@ -100,8 +99,6 @@ stdenv.mkDerivation (rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // stdenv.lib.optionalAttrs (cross != null) {
|
} // stdenv.lib.optionalAttrs (cross != null) {
|
||||||
name = "${cross.config}-ghc-${version}";
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"CC=${stdenv.cc}/bin/${cross.config}-cc"
|
"CC=${stdenv.cc}/bin/${cross.config}-cc"
|
||||||
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"
|
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"
|
||||||
|
@ -29,7 +29,7 @@ let
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation (rec {
|
||||||
inherit version rev;
|
inherit version rev;
|
||||||
name = "ghc-${version}";
|
name = "${targetPrefix}ghc-${version}";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "git://git.haskell.org/ghc.git";
|
url = "git://git.haskell.org/ghc.git";
|
||||||
@ -107,8 +107,6 @@ stdenv.mkDerivation (rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // stdenv.lib.optionalAttrs (cross != null) {
|
} // stdenv.lib.optionalAttrs (cross != null) {
|
||||||
name = "${cross.config}-ghc-${version}";
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"CC=${stdenv.cc}/bin/${cross.config}-cc"
|
"CC=${stdenv.cc}/bin/${cross.config}-cc"
|
||||||
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"
|
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user