From d09269a22eed2e844b046c31899887aa6c1fb42d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 15 Mar 2013 20:38:15 +0100 Subject: [PATCH] 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. --- pkgs/build-support/cabal/default.nix | 4 ++-- pkgs/development/compilers/ghc/ghc-get-packages.sh | 2 +- pkgs/development/compilers/ghc/with-packages.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index c1b8d6d5fea6..2eedd315830c 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -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 diff --git a/pkgs/development/compilers/ghc/ghc-get-packages.sh b/pkgs/development/compilers/ghc/ghc-get-packages.sh index 9ed1455d2321..71e58e66a5eb 100755 --- a/pkgs/development/compilers/ghc/ghc-get-packages.sh +++ b/pkgs/development/compilers/ghc/ghc-get-packages.sh @@ -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" diff --git a/pkgs/development/compilers/ghc/with-packages.nix b/pkgs/development/compilers/ghc/with-packages.nix index 99e91901d00c..28a639246ce4 100644 --- a/pkgs/development/compilers/ghc/with-packages.nix +++ b/pkgs/development/compilers/ghc/with-packages.nix @@ -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 "