forked from mirrors/nixpkgs
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}
|
||||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
buildInputs = [perl];
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
postUnpack =
|
||||
# Strip is harmful, see also below. It's important that this happens
|
||||
|
@ -48,9 +48,11 @@ stdenv.mkDerivation rec {
|
|||
done
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out --with-gmp-libraries=${stdenv.lib.getLib gmp}/lib --with-gmp-includes=${stdenv.lib.getDev gmp}/include
|
||||
'';
|
||||
configurePlatforms = [ ];
|
||||
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
|
||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
||||
|
@ -63,7 +65,10 @@ stdenv.mkDerivation rec {
|
|||
postInstall = ''
|
||||
# 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
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
|||
}.${stdenv.hostPlatform.system}
|
||||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
buildInputs = [perl];
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
postUnpack =
|
||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||
|
@ -87,11 +87,11 @@ stdenv.mkDerivation rec {
|
|||
done
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out \
|
||||
--with-gmp-libraries=${gmp.out or gmp}/lib --with-gmp-includes=${gmp.dev or gmp}/include \
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
|
||||
'';
|
||||
configurePlatforms = [ ];
|
||||
configureFlags = [
|
||||
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||
"--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
|
||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
||||
|
@ -101,7 +101,8 @@ stdenv.mkDerivation rec {
|
|||
# calls install-strip ...
|
||||
dontBuild = true;
|
||||
|
||||
postInstall = ''
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
|||
}.${stdenv.hostPlatform.system}
|
||||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
buildInputs = [perl];
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
postUnpack =
|
||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||
|
@ -92,11 +92,11 @@ stdenv.mkDerivation rec {
|
|||
done
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out \
|
||||
--with-gmp-libraries=${gmp.out or gmp}/lib --with-gmp-includes=${gmp.dev or gmp}/include \
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
|
||||
'';
|
||||
configurePlatforms = [ ];
|
||||
configureFlags = [
|
||||
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||
"--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
|
||||
# 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
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
|
|
Loading…
Reference in a new issue