Updated GHC HEAD snapshot.
svn path=/nixpkgs/trunk/; revision=34379
This commit is contained in:
parent
acb95ca925
commit
789df7619e
@ -1,17 +1,19 @@
|
||||
{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.5.20120419";
|
||||
version = "7.5.20120607";
|
||||
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/current/dist/${name}-src.tar.bz2";
|
||||
sha256 = "0fwq2s3syk3l4xx0m8x6h67snldlf3qk9bjjkvx46sgr0q3xjd05";
|
||||
sha256 = "1xrdx646g5ip2f2jypbm46y6jis3ddf8bild2704swbl2j4yb3vb";
|
||||
};
|
||||
|
||||
buildInputs = [ ghc perl gmp ncurses ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildMK = ''
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
|
||||
|
@ -10,6 +10,17 @@ stdenv.mkDerivation rec {
|
||||
unpackPhase = "true";
|
||||
|
||||
installPhase = ''
|
||||
numversion=$(${ghc}/bin/ghc --numeric-version)
|
||||
majorversion=''${numversion%%.*}
|
||||
minorversion=''${numversion#*.}
|
||||
minorversion=''${minorversion%%.*}
|
||||
|
||||
if [[ $majorversion -gt 6 ]] && [[ $minorversion -gt 4 ]]; then
|
||||
globalConf="--global-package-db"
|
||||
else
|
||||
globalConf="--global-conf"
|
||||
fi
|
||||
|
||||
originalTopDir="${ghc}/lib/ghc-${ghc.version}"
|
||||
originalPkgDir="$originalTopDir/package.conf.d"
|
||||
linkedTopDir="$out/lib"
|
||||
@ -57,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
|
||||
echo -n "Generating package cache "
|
||||
${ghc}/bin/ghc-pkg --global-conf $linkedPkgDir recache
|
||||
${ghc}/bin/ghc-pkg $globalConf $linkedPkgDir recache
|
||||
echo .
|
||||
|
||||
echo -n "Generating wrappers "
|
||||
@ -73,7 +84,7 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
|
||||
for prg in ghc-pkg ghc-pkg-${ghc.version}; do
|
||||
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-conf $linkedPkgDir"
|
||||
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "$globalConf $linkedPkgDir"
|
||||
echo -n .
|
||||
done
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user