nixpkgs/pkgs/development/compilers/ghc/setup-hook.sh
Eelco Dolstra baad5d7cb4 * GHC setup hook: don't generate wrappers around ghc etc., instead
set GHC_PACKAGE_PATH.
* Let Cabal generate a package configuration file
  ($out/nix-support/ghc-package.conf) instead of a registration
  script.

svn path=/nixpkgs/trunk/; revision=15127
2009-04-18 15:23:00 +00:00

17 lines
431 B
Bash

# Create isolated package config
packages_db=$TMPDIR/.package.conf
cp @ghc@/lib/ghc-*/package.conf $packages_db
chmod u+w $packages_db
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
}
envHooks=(${envHooks[@]} addLibToPackageConf)