* 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:
@@ -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)
|
||||
|
||||
@@ -11,4 +11,5 @@ stdenv.mkDerivation {
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
inherit ghc;
|
||||
ghcVersion = ghc.version;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user