about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2016-06-20 23:50:41 -0700
committerJohn Ericson <Ericson2314@Yahoo.com>2016-06-20 23:53:09 -0700
commit7cbf4a56f7f6f281570692403e79f89cc21ae388 (patch)
tree8f8eccb12a9aece2169d0b95f8dab2d147d3a2c7 /pkgs/development/compilers/ghc
parent5b7bdb28615cd033d38267328d8d74723570beec (diff)
downloadnixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.tar
nixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.tar.gz
nixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.tar.bz2
nixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.tar.lz
nixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.tar.xz
nixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.tar.zst
nixlib-7cbf4a56f7f6f281570692403e79f89cc21ae388.zip
Remove dead `pkgs/development/compilers/ghc/with-packages.nix`
Superseded by `/pkgs/development/haskell-modules/with-packages-wrapper.nix`
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/with-packages.nix70
1 files changed, 0 insertions, 70 deletions
diff --git a/pkgs/development/compilers/ghc/with-packages.nix b/pkgs/development/compilers/ghc/with-packages.nix
deleted file mode 100644
index 9909c49e1435..000000000000
--- a/pkgs/development/compilers/ghc/with-packages.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-{ stdenv, ghc, packages, buildEnv, makeWrapper, ignoreCollisions ? false }:
-
-# This wrapper works only with GHC 6.12 or later.
-assert stdenv.lib.versionOlder "6.12" ghc.version;
-
-# It's probably a good idea to include the library "ghc-paths" in the
-# compiler environment, because we have a specially patched version of
-# that package in Nix that honors these environment variables
-#
-#   NIX_GHC
-#   NIX_GHCPKG
-#   NIX_GHC_DOCDIR
-#   NIX_GHC_LIBDIR
-#
-# instead of hard-coding the paths. The wrapper sets these variables
-# appropriately to configure ghc-paths to point back to the wrapper
-# instead of to the pristine GHC package, which doesn't know any of the
-# additional libraries.
-#
-# A good way to import the environment set by the wrapper below into
-# your shell is to add the following snippet to your ~/.bashrc:
-#
-#   if [ -e ~/.nix-profile/bin/ghc ]; then
-#     eval $(grep export ~/.nix-profile/bin/ghc)
-#   fi
-
-let
-  ghc761OrLater = stdenv.lib.versionOlder "7.6.1" ghc.version;
-  packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
-  libDir        = "$out/lib/ghc-${ghc.version}";
-  docDir        = "$out/share/doc/ghc/html";
-  packageCfgDir = "${libDir}/package.conf.d";
-  isHaskellPkg  = x: (x ? pname) && (x ? version);
-in
-if packages == [] then ghc else
-buildEnv {
-  name = "haskell-env-${ghc.name}";
-  paths = stdenv.lib.filter isHaskellPkg (stdenv.lib.closePropagation packages) ++ [ghc];
-  inherit ignoreCollisions;
-  postBuild = ''
-    . ${makeWrapper}/nix-support/setup-hook
-
-    for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
-      rm -f $out/bin/$prg
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg         \
-        --add-flags '"-B$NIX_GHC_LIBDIR"'               \
-        --set "NIX_GHC"        "$out/bin/ghc"           \
-        --set "NIX_GHCPKG"     "$out/bin/ghc-pkg"       \
-        --set "NIX_GHC_DOCDIR" "${docDir}"              \
-        --set "NIX_GHC_LIBDIR" "${libDir}"
-    done
-
-    for prg in runghc runhaskell; do
-      rm -f $out/bin/$prg
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg         \
-        --add-flags "-f $out/bin/ghc"                   \
-        --set "NIX_GHC"        "$out/bin/ghc"           \
-        --set "NIX_GHCPKG"     "$out/bin/ghc-pkg"       \
-        --set "NIX_GHC_DOCDIR" "${docDir}"              \
-        --set "NIX_GHC_LIBDIR" "${libDir}"
-    done
-
-    for prg in ghc-pkg ghc-pkg-${ghc.version}; do
-      rm -f $out/bin/$prg
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
-    done
-
-    $out/bin/ghc-pkg recache
-  '';
-}