ghc prebuilt: Clean up derivations ever so slightly
These changes do break hashes, but are good to have everywhere for consistency. Plus, changing the bootstrap causes a Haskell mass rebuild anyways.
This commit is contained in:
parent
407198c1cc
commit
26a46295eb
|
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||||
}.${stdenv.hostPlatform.system}
|
}.${stdenv.hostPlatform.system}
|
||||||
or (throw "cannot bootstrap GHC on this platform"));
|
or (throw "cannot bootstrap GHC on this platform"));
|
||||||
|
|
||||||
buildInputs = [perl];
|
nativeBuildInputs = [ perl ];
|
||||||
|
|
||||||
postUnpack =
|
postUnpack =
|
||||||
# Strip is harmful, see also below. It's important that this happens
|
# Strip is harmful, see also below. It's important that this happens
|
||||||
|
@ -48,9 +48,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePlatforms = [ ];
|
||||||
./configure --prefix=$out --with-gmp-libraries=${stdenv.lib.getLib gmp}/lib --with-gmp-includes=${stdenv.lib.getDev gmp}/include
|
configureFlags = [
|
||||||
'';
|
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||||
|
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
|
||||||
|
];
|
||||||
|
|
||||||
# Stripping combined with patchelf breaks the executables (they die
|
# Stripping combined with patchelf breaks the executables (they die
|
||||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
||||||
|
@ -63,7 +65,10 @@ stdenv.mkDerivation rec {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way
|
# bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way
|
||||||
sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf
|
sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf
|
||||||
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
cd $TMP
|
cd $TMP
|
||||||
mkdir test-ghc; cd test-ghc
|
mkdir test-ghc; cd test-ghc
|
||||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
}.${stdenv.hostPlatform.system}
|
}.${stdenv.hostPlatform.system}
|
||||||
or (throw "cannot bootstrap GHC on this platform"));
|
or (throw "cannot bootstrap GHC on this platform"));
|
||||||
|
|
||||||
buildInputs = [perl];
|
nativeBuildInputs = [ perl ];
|
||||||
|
|
||||||
postUnpack =
|
postUnpack =
|
||||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||||
|
@ -87,11 +87,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePlatforms = [ ];
|
||||||
./configure --prefix=$out \
|
configureFlags = [
|
||||||
--with-gmp-libraries=${gmp.out or gmp}/lib --with-gmp-includes=${gmp.dev or gmp}/include \
|
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
|
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
|
||||||
'';
|
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}";
|
||||||
|
|
||||||
# Stripping combined with patchelf breaks the executables (they die
|
# Stripping combined with patchelf breaks the executables (they die
|
||||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
||||||
|
@ -101,7 +101,8 @@ stdenv.mkDerivation rec {
|
||||||
# calls install-strip ...
|
# calls install-strip ...
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
postInstall = ''
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
cd $TMP
|
cd $TMP
|
||||||
mkdir test-ghc; cd test-ghc
|
mkdir test-ghc; cd test-ghc
|
||||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
}.${stdenv.hostPlatform.system}
|
}.${stdenv.hostPlatform.system}
|
||||||
or (throw "cannot bootstrap GHC on this platform"));
|
or (throw "cannot bootstrap GHC on this platform"));
|
||||||
|
|
||||||
buildInputs = [perl];
|
nativeBuildInputs = [ perl ];
|
||||||
|
|
||||||
postUnpack =
|
postUnpack =
|
||||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||||
|
@ -92,11 +92,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePlatforms = [ ];
|
||||||
./configure --prefix=$out \
|
configureFlags = [
|
||||||
--with-gmp-libraries=${gmp.out or gmp}/lib --with-gmp-includes=${gmp.dev or gmp}/include \
|
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
|
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
|
||||||
'';
|
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}";
|
||||||
|
|
||||||
# Stripping combined with patchelf breaks the executables (they die
|
# Stripping combined with patchelf breaks the executables (they die
|
||||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
||||||
|
@ -114,7 +114,8 @@ stdenv.mkDerivation rec {
|
||||||
ln -s ${libiconv}/lib/libiconv.dylib utils/ghc-cabal/dist-install/build/tmp
|
ln -s ${libiconv}/lib/libiconv.dylib utils/ghc-cabal/dist-install/build/tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
cd $TMP
|
cd $TMP
|
||||||
mkdir test-ghc; cd test-ghc
|
mkdir test-ghc; cd test-ghc
|
||||||
|
|
Loading…
Reference in a new issue