forked from mirrors/nixpkgs
* 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:
parent
4ce5419f17
commit
ffcd38403e
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -79,8 +79,9 @@ attrs :
|
|||
|
||||
./Setup copy
|
||||
|
||||
ensureDir $out/nix-support
|
||||
./Setup register --gen-pkg-config=$out/nix-support/ghc-package.conf
|
||||
local confDir=$out/lib/ghc-pkgs/ghc-${attrs.ghc.ghc.version}
|
||||
ensureDir $confDir
|
||||
./Setup register --gen-pkg-config=$confDir/${self.fname}.conf
|
||||
|
||||
eval "$postInstall"
|
||||
'';
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
{pkgs, ghc}:
|
||||
|
||||
let ghcOrig = ghc; in
|
||||
let ghcReal = ghc; in
|
||||
|
||||
rec {
|
||||
|
||||
inherit ghcReal;
|
||||
|
||||
# In the remainder, `ghc' refers to the wrapper. This is because
|
||||
# it's never useful to use the wrapped GHC (`ghcReal'), as the
|
||||
# wrapper provides essential functionality: the ability to find
|
||||
# Haskell packages in the buildInputs automatically.
|
||||
ghc = import ../development/compilers/ghc/wrapper.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
ghc = ghcOrig;
|
||||
ghc = ghcReal;
|
||||
};
|
||||
|
||||
cabal = import ../development/libraries/haskell/cabal/cabal.nix {
|
||||
|
|
Loading…
Reference in a new issue