* Another sync with the trunk.

svn path=/nixpkgs/branches/stdenv-updates/; revision=15269
This commit is contained in:
Eelco Dolstra
2009-04-23 11:59:43 +00:00
151 changed files with 4866 additions and 3182 deletions

View File

@@ -1,41 +0,0 @@
# Support dir for isolating GHC
ghc_support=$TMPDIR/ghc-6.6-nix-support
mkdir -p $ghc_support
# Create isolated package config
packages_db=$ghc_support/package.conf
cp @out@/lib/ghc-*/package.conf $packages_db
chmod +w $packages_db
# Generate wrappers for GHC that use the isolated package config
makeWrapper() {
wrapperName="$1"
wrapper="$ghc_support/$wrapperName"
shift #the other arguments are passed to the source app
echo '#!'"$SHELL" > "$wrapper"
echo "exec \"@out@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper"
chmod +x "$wrapper"
}
makeWrapper "ghc" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "ghci" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "runghc" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "runhaskell" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "ghc-pkg" "--global-conf $packages_db"
# Add wrappers to search path
export _PATH=$ghc_support:$_PATH
# Env hook to add packages to the package config
addLibToPackageConf ()
{
local regscript=$1/nix-support/register-ghclib.sh
if test -f $regscript; then
local oldpath=$PATH
export PATH=$ghc_support:$PATH
sh $regscript $package_db
export PATH=$oldpath
fi
}
envHooks=(${envHooks[@]} addLibToPackageConf)

View File

@@ -1,26 +0,0 @@
source $stdenv/setup
# Setup isolated package management
postInstall()
{
ensureDir "$out/nix-support"
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
echo "ghc=$out" >> $out/nix-support/setup-hook
echo "" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
}
postInstall=postInstall
configureFlags="--with-readline-libraries=\"$readline/lib\""
preConfigure()
{
chmod u+x rts/gmp/configure
# add library paths for gmp, ncurses
sed -i "s|^\(library-dirs.*$\)|\1 \"$gmp/lib\"|" rts/package.conf.in
sed -i "s|^\(library-dirs.*$\)|\1 \"$ncurses/lib\"|" libraries/readline/package.conf.in
}
preConfigure=preConfigure
# Standard configure/make/make install
genericBuild

View File

@@ -1,26 +0,0 @@
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
stdenv.mkDerivation {
name = "ghc-6.6";
src = map fetchurl [
{ url = http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src.tar.bz2;
md5 = "2427a8d7d14f86e0878df6b54938acf7";
}
{ url = http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src-extralibs.tar.bz2;
md5 = "14b22fce36caffa509046361724bc119";
}
];
builder = ./builder.sh;
buildInputs = [ghc readline perl m4];
setupHook = ./setup-hook.sh;
meta = {
description = "The Glasgow Haskell Compiler v6.6";
};
inherit readline gmp ncurses;
}

View File

@@ -1,41 +0,0 @@
# Support dir for isolating GHC
ghc_support=$TMPDIR/ghc-6.6-nix-support
mkdir -p $ghc_support
# Create isolated package config
packages_db=$ghc_support/package.conf
cp $ghc/lib/ghc-*/package.conf $packages_db
chmod +w $packages_db
# Generate wrappers for GHC that use the isolated package config
makeWrapper() {
wrapperName="$1"
wrapper="$ghc_support/$wrapperName"
shift #the other arguments are passed to the source app
echo '#!'"$SHELL" > "$wrapper"
echo "exec \"$ghc/bin/$wrapperName\" $@" '"$@"' >> "$wrapper"
chmod +x "$wrapper"
}
makeWrapper "ghc" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "ghci" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "runghc" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "runhaskell" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "ghc-pkg" "--global-conf $packages_db"
# Add wrappers to search path
export _PATH=$ghc_support:$_PATH
# Env hook to add packages to the package config
addLibToPackageConf ()
{
local regscript=$1/nix-support/register-ghclib.sh
if test -f $regscript; then
local oldpath=$PATH
export PATH=$ghc_support:$PATH
sh $regscript $package_db
export PATH=$oldpath
fi
}
envHooks=(${envHooks[@]} addLibToPackageConf)

View File

@@ -1,47 +0,0 @@
{stdenv, fetchurl, readline, ghc, happy, alex, perl, m4, gmp, ncurses, haskellEditline}:
stdenv.mkDerivation (rec {
name = "ghc-6.9.20080719";
homepage = "http://www.haskell.org/ghc";
src = map fetchurl [
{ url = "${homepage}/dist/current/dist/${name}-src.tar.bz2";
sha256 = "ed2371c3632962fccab6ec60c04e9fc6a38f3ade3a30a464cea5d53784bc3a34";
}
{ url = "${homepage}/dist/current/dist/${name}-src-extralibs.tar.bz2";
sha256 = "d3c7aa7d53befe268f92148cc8f3b0861dfdc84e9b21b039af0f5b230bfbf72b";
}
];
buildInputs = [ghc readline perl m4 gmp happy alex haskellEditline];
# The setup hook is executed by other packages building with ghc.
# It then looks for package configurations that are available and
# build a package database on the fly.
setupHook = ./setup-hook.sh;
meta = {
description = "The Glasgow Haskell Compiler";
};
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${gcc}/bin/gcc"
];
preConfigure = ''
# should not be present in a clean distribution
rm utils/pwd/pwd
# fix bug in makefile
sed -i -e 's/:\\"//' -e 's/\\"//' mk/config.mk.in
'';
postInstall = ''
ln -s $out/lib/${name}/ghc $out/lib/${name}/${name}
'';
inherit (stdenv) gcc;
inherit readline gmp ncurses;
})

View File

@@ -1,41 +0,0 @@
# Support dir for isolating GHC
ghc_support=$TMPDIR/ghc-6.8-nix-support
ensureDir $ghc_support
# Create isolated package config
packages_db=$ghc_support/package.conf
cp @out@/lib/ghc-*/package.conf $packages_db
chmod +w $packages_db
# Generate wrappers for GHC that use the isolated package config
makeWrapper() {
wrapperName="$1"
wrapper="$ghc_support/$wrapperName"
shift #the other arguments are passed to the source app
echo '#!'"$SHELL" > "$wrapper"
echo "exec \"@out@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper"
chmod +x "$wrapper"
}
makeWrapper "ghc" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "ghci" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "runghc" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "runhaskell" "-no-user-package-conf -package-conf $packages_db"
makeWrapper "ghc-pkg" "--global-conf $packages_db"
# Add wrappers to search path
export _PATH=$ghc_support:$_PATH
# Env hook to add packages to the package config
addLibToPackageConf ()
{
local regscript=$1/nix-support/register-ghclib.sh
if test -f $regscript; then
local oldpath=$PATH
export PATH=$ghc_support:$PATH
sh $regscript $package_db
export PATH=$oldpath
fi
}
envHooks=(${envHooks[@]} addLibToPackageConf)

View File

@@ -1,34 +0,0 @@
source $stdenv/setup
export HOME=$(pwd)/fake-home
makeWrapper() {
wrapperBase="$1"
wrapperName="$2"
wrapper="$out/$wrapperName"
shift; shift #the other arguments are passed to the source app
echo '#!'"$SHELL" > "$wrapper"
echo "exec \"$wrapperBase/$wrapperName\" $@" '"$@"' > "$wrapper"
chmod +x "$wrapper"
}
mkdir -p $out/nix-support $out/bin
packages_db=$out/nix-support/package.conf
#create packages database (start with compiler base packages)
cp $ghc/lib/ghc-*/package.conf $packages_db
chmod +w $packages_db
for lib in $libraries; do
sh $lib/nix-support/register.sh $packages_db || exit 1
done
rm -f $packages_db.old
#create the wrappers
#NB: The double dash for ghc-pkg is not a typo!
makeWrapper $ghc "bin/ghc" "-package-conf" $packages_db
makeWrapper $ghc "bin/ghci" "-package-conf" $packages_db
makeWrapper $ghc "bin/runghc" "-package-conf" $packages_db
makeWrapper $ghc "bin/runhaskell" "-package-conf" $packages_db
makeWrapper $ghc "bin/ghc-pkg" "--global-conf" $packages_db
# todo: link all other binaries of ghc

View File

@@ -1,7 +0,0 @@
{stdenv, ghc, libraries}:
stdenv.mkDerivation {
inherit (ghc) name meta;
inherit ghc libraries;
builder = ./builder.sh;
}

View File

@@ -1,31 +1,32 @@
{stdenv, fetchurl, perl, editline, ncurses, gmp, makeWrapper}:
{stdenv, fetchurl, perl, libedit, ncurses, gmp}:
stdenv.mkDerivation rec {
version = "6.10.1";
name = "ghc-${version}";
name = "ghc-${version}-binary";
src =
if stdenv.system == "i686-linux" then
fetchurl {
# libedit .so.0
# This binary requires libedit.so.0 (rather than libedit.so.2).
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
sha256 = "18l0vwlf7y86s65klpdvz4ccp8kydvcmyh03c86hld8jvx16q7zz";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
# libedit .so.0
# Idem.
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
sha256 = "14jvvn333i36wm7mmvi47jr93f5hxrw1h2dpjvqql0rp00svhzzg";
}
else if stdenv.system == "i686-darwin" then
fetchurl {
# update
# untested
# Idem.
url = "http://haskell.org/ghc/dist/${version}/maeder/ghc-${version}-i386-apple-darwin.tar.bz2";
sha256 = "0lax61cfzxkrjb7an3magdax6c8fygsirpw9qfmc651k2sfby1mq";
}
else throw "cannot bootstrap GHC on this platform";
else throw "cannot bootstrap GHC on this platform";
buildInputs = [perl makeWrapper];
buildInputs = [perl];
postUnpack =
# Strip is harmful, see also below. It's important that this happens
@@ -45,7 +46,7 @@ stdenv.mkDerivation rec {
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "${editline}/lib:${ncurses}/lib:${gmp}/lib" {} \;
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
done
@@ -61,46 +62,45 @@ stdenv.mkDerivation rec {
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
buildPhase = ":";
buildPhase = "true";
# The binaries for Darwin use frameworks, so fake those frameworks,
# and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so
# that the executables work with no special setup.
postInstall = (if stdenv.isDarwin then "
postInstall =
(if stdenv.isDarwin then
''
ensureDir $out/frameworks/GMP.framework/Versions/A
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP
# !!! fix this
ensureDir $out/frameworks/GNUeditline.framework/Versions/A
ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline
ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline
ensureDir $out/frameworks/GMP.framework/Versions/A
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP
ensureDir $out/frameworks/GNUeditline.framework/Versions/A
ln -s ${editline}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline
ln -s ${editline}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline
mv $out/bin $out/bin-orig
mkdir $out/bin
for i in $(cd $out/bin-orig && ls); do
echo "#! $SHELL -e" >> $out/bin/$i
echo "DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \"\$@\"" >> $out/bin/$i
chmod +x $out/bin/$i
done
'' else "")
+
''
# 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}/lib\",\2@" $out/lib/ghc-${version}/package.conf
mv $out/bin $out/bin-orig
mkdir $out/bin
for i in $(cd $out/bin-orig && ls); do
echo \"#! $SHELL -e\" >> $out/bin/$i
echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i
chmod +x $out/bin/$i
done
" else "")
+
''
# 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}/lib\",\2@" $out/lib/ghc-${version}/package.conf
wrapProgram $out/bin/ghc --set LDPATH "${gmp}/lib"
# sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
module Main where
main = putStrLn "yes"
EOF
$out/bin/ghc --make main.hs
echo compilation ok
[ $(./main) == "yes" ]
''
;
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
module Main where
main = putStrLn "yes"
EOF
$out/bin/ghc --make main.hs
echo compilation ok
[ $(./main) == "yes" ]
'';
}

View File

@@ -0,0 +1,27 @@
{stdenv, fetchurl, libedit, ghc, perl, gmp, ncurses}:
stdenv.mkDerivation rec {
version = "6.10.1";
name = "ghc-${version}";
homepage = "http://haskell.org/ghc";
src = fetchurl {
url = "${homepage}/dist/${version}/${name}-src.tar.bz2";
sha256 = "16q08cxxsmh4hgjhvkl739pc1hh81gljycfq1d2z6m1ld3jpbi22";
};
buildInputs = [ghc libedit perl gmp];
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
];
meta = {
inherit homepage;
description = "The Glasgow Haskell Compiler";
};
}

View File

@@ -0,0 +1,100 @@
{stdenv, fetchurl, perl, libedit, ncurses, gmp}:
stdenv.mkDerivation rec {
version = "6.10.2";
name = "ghc-${version}-binary";
src =
if stdenv.system == "i686-linux" then
fetchurl {
# This binary requires libedit.so.0 (rather than libedit.so.2).
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
# Idem.
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj";
}
else throw "cannot bootstrap GHC on this platform";
buildInputs = [perl];
postUnpack =
# Strip is harmful, see also below. It's important that this happens
# first. The GHC Cabal build system makes use of strip by default and
# has hardcoded paths to /usr/bin/strip in many places. We replace
# those below, making them point to our dummy script.
''
mkdir "$TMP/bin"
for i in strip; do
echo '#!/bin/sh' >> "$TMP/bin/$i"
chmod +x "$TMP/bin/$i"
PATH="$TMP/bin:$PATH"
done
'' +
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
done
'' else "");
configurePhase = ''
./configure --prefix=$out --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include
'';
# Stripping combined with patchelf breaks the executables (they die
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
dontStrip = true;
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
buildPhase = "true";
# The binaries for Darwin use frameworks, so fake those frameworks,
# and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so
# that the executables work with no special setup.
postInstall =
(if stdenv.isDarwin then
''
ensureDir $out/frameworks/GMP.framework/Versions/A
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP
# !!! fix this
ensureDir $out/frameworks/GNUeditline.framework/Versions/A
ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline
ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline
mv $out/bin $out/bin-orig
mkdir $out/bin
for i in $(cd $out/bin-orig && ls); do
echo \"#! $SHELL -e\" >> $out/bin/$i
echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i
chmod +x $out/bin/$i
done
'' else "")
+
''
# 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}/lib\",\2@" $out/lib/ghc-${version}/package.conf
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
module Main where
main = putStrLn "yes"
EOF
$out/bin/ghc --make main.hs
echo compilation ok
[ $(./main) == "yes" ]
'';
}

View File

@@ -0,0 +1,27 @@
{stdenv, fetchurl, libedit, ghc, perl, gmp, ncurses}:
stdenv.mkDerivation rec {
version = "6.10.2";
name = "ghc-${version}";
homepage = "http://haskell.org/ghc";
src = fetchurl {
url = "${homepage}/dist/${version}/${name}-src.tar.bz2";
sha256 = "0q3wgp8svfl54kpyp55a1kh63cni5vzz811hqjsps84jdg0lg56m";
};
buildInputs = [ghc libedit perl gmp];
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
];
meta = {
inherit homepage;
description = "The Glasgow Haskell Compiler";
};
}

View File

@@ -1,7 +1,7 @@
{stdenv, fetchurl, perl, readline, ncurses, gmp}:
stdenv.mkDerivation {
name = if stdenv.system == "i686-darwin" then "ghc-6.6.1" else "ghc-6.4.2";
name = if stdenv.system == "i686-darwin" then "ghc-6.6.1-binary" else "ghc-6.4.2-binary";
src =
if stdenv.system == "i686-linux" then
@@ -15,6 +15,9 @@ stdenv.mkDerivation {
md5 = "8f5fe48798f715cd05214a10987bf6d5";
}
else if stdenv.system == "i686-darwin" then
/* Yes, this isn't GHC 6.4.2. But IIRC either there was no
6.4.2 binary for Darwin, or it didn't work. In any case, in
Nixpkgs we just need this bootstrapping a "real" GHC. */
fetchurl {
url = http://www.haskell.org/ghc/dist/6.6.1/ghc-6.6.1-i386-apple-darwin.tar.bz2;
sha256 = "1drbsicanr6jlykvs4vs6gbi2q9ac1bcaxz2vzwh3pfv3lfibwia";
@@ -38,7 +41,7 @@ stdenv.mkDerivation {
# The binaries for Darwin use frameworks, so fake those frameworks,
# and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so
# that the executables work with no special setup.
postInstall = if stdenv.isDarwin then "
postInstall = if stdenv.isDarwin then ''
ensureDir $out/frameworks/GMP.framework/Versions/A
ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP
@@ -50,13 +53,13 @@ stdenv.mkDerivation {
mkdir $out/bin-orig
for i in $(cd $out/bin && ls *); do
mv $out/bin/$i $out/bin-orig/$i
echo \"#! $SHELL -e\" >> $out/bin/$i
echo "#! $SHELL -e" >> $out/bin/$i
extraFlag=
if test $i != ghc-pkg; then extraFlag=\"-framework-path $out/frameworks\"; fi
echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i $extraFlag \\\"\\$@\\\"\" >> $out/bin/$i
if test $i != ghc-pkg; then extraFlag="-framework-path $out/frameworks"; fi
echo "DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i $extraFlag \"\$@\"" >> $out/bin/$i
chmod +x $out/bin/$i
done
" else "";
'' else "";
}

View File

@@ -1,15 +1,25 @@
{stdenv, gcc, fetchurl, perl, ghc, m4, readline, ncurses, gmp}:
{stdenv, fetchurl, perl, ghc, m4, readline, ncurses, gmp}:
stdenv.mkDerivation {
name = "ghc-6.4.2";
src = fetchurl {
url = http://www.haskell.org/ghc/dist/6.4.2/ghc-6.4.2-src.tar.bz2;
md5 = "a394bf14e94c3bca5507d568fcc03375";
};
buildInputs = [perl ghc m4];
propagatedBuildInputs = [readline ncurses gmp];
builder = ./builder.sh;
inherit gcc;
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
preConfigure =
''
# Don't you hate build processes that write in $HOME? :-(
export HOME=$(pwd)/fake-home
mkdir -p $HOME
'';
meta = {
description = "The Glasgow Haskell Compiler";

View File

@@ -14,8 +14,6 @@ stdenv.mkDerivation (rec {
buildInputs = [ghc readline perl58 m4 gmp];
setupHook = ./setup-hook.sh;
meta = {
description = "The Glasgow Haskell Compiler";
};

View File

@@ -16,11 +16,6 @@ stdenv.mkDerivation (rec {
buildInputs = [ghc readline perl m4 gmp];
# The setup hook is executed by other packages building with ghc.
# It then looks for package configurations that are available and
# build a package database on the fly.
setupHook = ./setup-hook.sh;
meta = {
description = "The Glasgow Haskell Compiler";
};
@@ -29,14 +24,11 @@ stdenv.mkDerivation (rec {
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${gcc}/bin/gcc"
"--with-gcc=${stdenv.gcc}/bin/gcc"
];
preConfigure = "
# still requires a hack for ncurses
sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in
";
inherit (stdenv) gcc;
inherit readline gmp ncurses;
})

View File

@@ -1,25 +1,21 @@
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses, haddock}:
stdenv.mkDerivation (rec {
name = "ghc-6.8.3";
stdenv.mkDerivation rec {
version = "6.8.3";
name = "ghc-${version}";
homepage = "http://www.haskell.org/ghc";
src = map fetchurl [
{ url = "${homepage}/dist/6.8.3/${name}-src.tar.bz2";
{ url = "${homepage}/dist/${version}/${name}-src.tar.bz2";
sha256 = "1fc1ff82a555532f1c9d2dc628fd9de5e6ebab2ce6ee9490a34174ceb6f76e6b";
}
{ url = "${homepage}/dist/6.8.3/${name}-src-extralibs.tar.bz2";
{ url = "${homepage}/dist/${version}/${name}-src-extralibs.tar.bz2";
sha256 = "ee2f5ba6a46157fc53eae515cb6fa1ed3c5023e7eac15981d92af0af00ee2ba2";
}
];
buildInputs = [ghc readline perl m4 gmp haddock];
# The setup hook is executed by other packages building with ghc.
# It then looks for package configurations that are available and
# build a package database on the fly.
setupHook = ./setup-hook.sh;
meta = {
description = "The Glasgow Haskell Compiler";
};
@@ -28,7 +24,7 @@ stdenv.mkDerivation (rec {
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${gcc}/bin/gcc"
"--with-gcc=${stdenv.gcc}/bin/gcc"
];
preConfigure = ''
@@ -37,9 +33,4 @@ stdenv.mkDerivation (rec {
# build haddock docs
echo "HADDOCK_DOCS = YES" >> mk/build.mk
'';
installTargets = ["install" "install-docs"];
inherit (stdenv) gcc;
inherit readline gmp ncurses;
})
}

View File

@@ -1,9 +0,0 @@
source $stdenv/setup
configureFlags="--with-gcc=$gcc/bin/gcc"
# Don't you hate build processes that write in $HOME? :-(
export HOME=$(pwd)/fake-home
mkdir -p $HOME
genericBuild

View File

@@ -0,0 +1,17 @@
# Create isolated package config
packages_db=$TMPDIR/.package.conf
cp @ghc@/lib/ghc-*/package.conf $packages_db
chmod u+w $packages_db
export GHC_PACKAGE_PATH=$packages_db
# Env hook to add packages to the package config
addLibToPackageConf () {
local fn
shopt -s nullglob
for fn in $1/lib/ghc-pkgs/ghc-@ghcVersion@/*.conf; do
@ghc@/bin/ghc-pkg register --force $fn
done
}
envHooks=(${envHooks[@]} addLibToPackageConf)

View File

@@ -0,0 +1,15 @@
{stdenv, ghc}:
stdenv.mkDerivation {
name = "ghc-wrapper-${ghc.version}";
propagatedBuildInputs = [ghc];
unpackPhase = "true";
installPhase = "true";
setupHook = ./setup-hook.sh;
inherit ghc;
ghcVersion = ghc.version;
}

View File

@@ -1,7 +1,7 @@
{stdenv, fetchurl, bison, flex}:
stdenv.mkDerivation {
name = "iasl-20090123.tar.gz";
name = "iasl-20090123";
src = fetchurl {
url = http://www.acpica.org/download/acpica-unix-20090123.tar.gz;
md5 = "4ca6484acbf16cf67fd4ba91d32fd0a0";

View File

@@ -28,11 +28,11 @@ rec {
strategoxt = stdenv.mkDerivation rec {
name = "strategoxt-0.17pre18269";
name = "strategoxt-0.17pre18583";
src = fetchurl {
url = "http://releases.strategoxt.org/strategoxt/${name}-a0f0wy0j/${name}.tar.gz";
sha256 = "7c51c2452bd45f34cd480b6b3cbaac50e0fc53fbb1a884d97cf4e2c2b5330577";
url = "http://releases.strategoxt.org/strategoxt/strategoxt-0.17pre18583-i573smdl/strategoxt-0.17pre18583.tar.gz";
sha256 = "4769d82a62d1c53fc3f4631ddef489e638ff2361a2eceb1226f2b56ab45b7784";
};
buildInputs = [pkgconfig aterm sdf getopt];