summary refs log tree commit diff
path: root/pkgs/top-level/haskell-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level/haskell-packages.nix')
-rw-r--r--pkgs/top-level/haskell-packages.nix46
1 files changed, 27 insertions, 19 deletions
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 099e45f10226..81a32e1219fe 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -1,24 +1,32 @@
-{ pkgs, callPackage, stdenv, buildPlatform, targetPlatform }:
+{ pkgs, lib, newScope, stdenv, buildPlatform, targetPlatform }:
 
-let # These are attributes in compiler and packages that don't support integer-simple.
-    integerSimpleExcludes = [
-      "ghc6102Binary"
-      "ghc704Binary"
-      "ghc742Binary"
-      "ghc6104"
-      "ghc6123"
-      "ghc704"
-      "ghc763"
-      "ghcjs"
-      "ghcjsHEAD"
-      "ghcCross"
-      "jhc"
-      "uhc"
-      "integer-simple"
-    ];
-in rec {
+let
+  # These are attributes in compiler and packages that don't support integer-simple.
+  integerSimpleExcludes = [
+    "ghc6102Binary"
+    "ghc704Binary"
+    "ghc742Binary"
+    "ghc6104"
+    "ghc6123"
+    "ghc704"
+    "ghc763"
+    "ghcjs"
+    "ghcjsHEAD"
+    "ghcCross"
+    "jhc"
+    "uhc"
+    "integer-simple"
+  ];
+
+  haskellLib = import ../development/haskell-modules/lib.nix {
+    inherit (pkgs) lib;
+    inherit pkgs;
+  };
 
-  lib = import ../development/haskell-modules/lib.nix { inherit pkgs; };
+  callPackage = newScope { inherit haskellLib; };
+
+in rec {
+  lib = haskellLib;
 
   compiler = {