* Install the package config files under

$out/lib/ghc-pkgs/ghc-<version>/<package>.conf instead of under
  $out/nix-support/ghc-package.conf.  This makes them visible in the
  user's profile when installed with nix-env.

svn path=/nixpkgs/trunk/; revision=15135
This commit is contained in:
Eelco Dolstra
2009-04-18 20:24:36 +00:00
parent 4ce5419f17
commit ffcd38403e
4 changed files with 17 additions and 8 deletions

View File

@@ -7,10 +7,11 @@ export GHC_PACKAGE_PATH=$packages_db
# Env hook to add packages to the package config
addLibToPackageConf () {
local confFile=$1/nix-support/ghc-package.conf
if test -f $confFile; then
@ghc@/bin/ghc-pkg register $confFile
fi
local fn
shopt -s nullglob
for fn in $1/lib/ghc-pkgs/ghc-@ghcVersion@/*.conf; do
@ghc@/bin/ghc-pkg register $fn
done
}
envHooks=(${envHooks[@]} addLibToPackageConf)

View File

@@ -11,4 +11,5 @@ stdenv.mkDerivation {
setupHook = ./setup-hook.sh;
inherit ghc;
ghcVersion = ghc.version;
}