Fix the ghc-wrapper in order to enable runghc/runhaskell.

svn path=/nixpkgs/trunk/; revision=15774
This commit is contained in:
Andres Löh 2009-05-28 19:06:29 +00:00
parent 58b4add4e6
commit 2c096bf75f

View File

@ -11,9 +11,12 @@ stdenv.mkDerivation {
ensureDir $out/bin
cp $GHCGetPackages $out/bin/ghc-get-packages.sh
chmod 755 $out/bin/ghc-get-packages.sh
for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version} runghc runhaskell; do
for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\")"
done
for prg in runghc runhaskell; do
makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\" \" -package-conf --ghc-arg=\")"
done
for prg in ghc-pkg ghc-pkg-${ghc.version}; do
makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\" --package-conf=)"
done