mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Prevent link collisions by linking only Haskell packages.
svn path=/nixpkgs/trunk/; revision=30727
This commit is contained in:
parent
f237a3a418
commit
de5d98eff8
1 changed files with 18 additions and 12 deletions
|
@ -38,20 +38,24 @@ stdenv.mkDerivation rec {
|
|||
|
||||
for currentPath in ${stdenv.lib.concatStringsSep " " allPackages}; do
|
||||
currentPkgDir="$currentPath/lib/ghc-pkgs/ghc-${ghc.version}"
|
||||
echo -n "Linking $currentPath "
|
||||
for f in $currentPath/bin/*; do
|
||||
ln -s $f $out/bin
|
||||
echo -n .
|
||||
done
|
||||
for f in $currentPkgDir/*.conf; do
|
||||
ln -s $f $linkedPkgDir
|
||||
echo -n .
|
||||
done
|
||||
echo
|
||||
# Check if current path is a Cabal package for the current GHC
|
||||
if test -d $currentPkgDir; then
|
||||
echo -n "Linking $currentPath "
|
||||
for f in $currentPath/bin/*; do
|
||||
ln -s $f $out/bin
|
||||
echo -n .
|
||||
done
|
||||
for f in $currentPkgDir/*.conf; do
|
||||
ln -s $f $linkedPkgDir
|
||||
echo -n .
|
||||
done
|
||||
echo
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Generating package cache ..."
|
||||
echo -n "Generating package cache "
|
||||
${ghc}/bin/ghc-pkg --global-conf $linkedPkgDir recache
|
||||
echo .
|
||||
|
||||
echo -n "Generating wrappers "
|
||||
|
||||
|
@ -71,7 +75,9 @@ stdenv.mkDerivation rec {
|
|||
done
|
||||
|
||||
for prg in hp2ps hpc hasktags hsc2hs haddock haddock-${ghc.version}; do
|
||||
test -x ${ghc}/bin/$prg && ln -s ${ghc}/bin/$prg $out/bin/$prg && echo -n .
|
||||
if test -x ${ghc}/bin/$prg -a ! -x $out/bin/$prg; then
|
||||
ln -s ${ghc}/bin/$prg $out/bin/$prg && echo -n .
|
||||
fi
|
||||
done
|
||||
echo
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue