Updated my ghc stuff.

New is the file containing executables (such as alex/ happy)
some new libraries
The wrapper no longer installs tags by default. You have to add it to your config
So I'm ready to start merging

svn path=/nixpkgs/trunk/; revision=11554
This commit is contained in:
Marc Weber
2008-04-11 00:40:10 +00:00
parent 5efc5fe707
commit 772fd74b99
6 changed files with 118 additions and 28 deletions

View File

@@ -4,12 +4,15 @@ stdenv.mkDerivation {
inherit suffix name ghc readline ncurses;
buildInputs = (libraries ++ [ghcPkgUtil]);
tags = map (x : sourceWithTagsDerivation (sourceWithTagsFromDerivation x))
(uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } );
tags = if installSourceAndTags then
map (x : sourceWithTagsDerivation (sourceWithTagsFromDerivation x))
( uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } )
else [];
phases="installPhase";
installPhase="
set -e
ensureDir \$out/bin
if test -n \"\$ghcPackagedLibs\"; then
g=:\$(echo \$ghc/lib/ghc-*/package.conf)
@@ -29,5 +32,20 @@ EOF
for i in \$tags; do
ln -s \$i/src/* \$out/src
done
ensureDir \$out/bin
for i in `echo $GHC_PACKAGE_PATH | sed 's/:/ /g'`; do
o=\${i/lib*/}
o=\${i/nix-support*/}
for j in `find \${o}bin/ -type f 2>/dev/null` `find \${o}usr/local/bin/ -type f 2>/dev/null`; do
b=`basename \$j`
if [ \$b == sh ]; then continue; fi
if [ \$b == bash ]; then continue; fi
if [ \$b == bashbug ]; then continue; fi
if [ \$b == bashbug ]; then continue; fi
if [ -e \$out/bin/\$b ]; then continue; fi
ln -s \$j \$out/bin/;
done
done
";
}