Use the same directory layout for user-installed Haskell libraries that GHC

uses for its core libraries, so that these files integrate seamlessly into one
profile, living right next to each other. This change is eventually going to
simply our with-packages wrapper quite a bit.
This commit is contained in:
Peter Simons 2013-03-15 20:38:15 +01:00
parent 3e1de0f4e8
commit d09269a22e
3 changed files with 4 additions and 4 deletions

View file

@ -121,7 +121,7 @@
done
echo "configure flags: $extraConfigureFlags $configureFlags"
./Setup configure --verbose --prefix="$out" $extraConfigureFlags $configureFlags
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' --libsubdir='$pkgid' $extraConfigureFlags $configureFlags
eval "$postConfigure"
'';
@ -156,7 +156,7 @@
ensureDir $out/bin # necessary to get it added to PATH
local confDir=$out/lib/ghc-pkgs/ghc-${ghc.ghc.version}
local confDir=$out/lib/ghc-${ghc.ghc.version}/package.conf.d
local installedPkgConf=$confDir/${self.fname}.installedconf
local pkgConf=$confDir/${self.fname}.conf
ensureDir $confDir

View file

@ -12,7 +12,7 @@ fi
PATH="$2:$PATH"
IFS=":"
for p in $PATH; do
PkgDir="$p/../lib/ghc-pkgs/ghc-$version"
PkgDir="$p/../lib/ghc-$version/package.conf.d"
for i in $PkgDir/*.installedconf; do
# output takes place here
test -f $i && echo -n " $prefix$i"

View file

@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
echo "Linking selected packages and dependencies:"
for currentPath in ${stdenv.lib.concatStringsSep " " allPackages}; do
currentPkgDir="$currentPath/lib/ghc-pkgs/ghc-${ghc.version}"
currentPkgDir="$currentPath/lib/ghc-${ghc.version}/package.conf.d/"
# Check if current path is a Cabal package for the current GHC
if test -d $currentPkgDir; then
echo -n "Linking $currentPath "