summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/ghc-6.6.1/setup-hook.sh')
-rw-r--r--pkgs/development/compilers/ghc-6.6.1/setup-hook.sh41
1 files changed, 0 insertions, 41 deletions
diff --git a/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh b/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh
deleted file mode 100644
index 03057e82f4af7..0000000000000
--- a/pkgs/development/compilers/ghc-6.6.1/setup-hook.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-# Support dir for isolating GHC
-ghc_support=$TMPDIR/ghc-6.6-nix-support
-mkdir -p $ghc_support
-
-# Create isolated package config
-packages_db=$ghc_support/package.conf
-cp @out@/lib/ghc-*/package.conf $packages_db
-chmod +w $packages_db
-
-# Generate wrappers for GHC that use the isolated package config
-makeWrapper() {
-  wrapperName="$1"
-  wrapper="$ghc_support/$wrapperName"
-  shift #the other arguments are passed to the source app
-  echo '#!'"$SHELL" > "$wrapper"
-  echo "exec \"@out@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper"
-  chmod +x "$wrapper"
-}
-
-makeWrapper "ghc"         "-no-user-package-conf -package-conf $packages_db"
-makeWrapper "ghci"        "-no-user-package-conf -package-conf $packages_db"
-makeWrapper "runghc"      "-no-user-package-conf -package-conf $packages_db"
-makeWrapper "runhaskell"  "-no-user-package-conf -package-conf $packages_db"
-makeWrapper "ghc-pkg"     "--global-conf $packages_db"
-
-# Add wrappers to search path
-export _PATH=$ghc_support:$_PATH
-
-# Env hook to add packages to the package config
-addLibToPackageConf ()
-{
-    local regscript=$1/nix-support/register-ghclib.sh
-    if test -f $regscript; then
-        local oldpath=$PATH
-        export PATH=$ghc_support:$PATH
-        sh $regscript $package_db
-        export PATH=$oldpath
-    fi
-}
-
-envHooks=(${envHooks[@]} addLibToPackageConf)