From 807146cf751976103724a612ed369eb86cf7a3c7 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 8 Feb 2015 13:22:13 +0100 Subject: [PATCH] haskell-ng: make overrideScope respect the default lookup scope Build environments created by overrideScope lost the ability to find packages outside of the Haskell package set without help. This patch remedies this issue. Fixes https://github.com/NixOS/nixpkgs/issues/6192. --- pkgs/development/haskell-modules/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index e4e077def96f..6bfe92e43385 100644 --- a/pkgs/development/haskell-modules/default.nix +++ b/pkgs/development/haskell-modules/default.nix @@ -42,11 +42,11 @@ let }); callPackageWithScope = scope: drv: args: (stdenv.lib.callPackageWith scope drv args) // { - overrideScope = f: callPackageWithScope (fix (extend scope.__unfix__ f)) drv args; + overrideScope = f: callPackageWithScope (mkScope (fix (extend scope.__unfix__ f))) drv args; }; - defaultScope = pkgs // pkgs.xlibs // pkgs.gnome // self; - callPackage = drv: args: callPackageWithScope defaultScope drv args; + mkScope = scope: pkgs // pkgs.xlibs // pkgs.gnome // scope; + callPackage = drv: args: callPackageWithScope (mkScope self) drv args; in import ./hackage-packages.nix { inherit pkgs stdenv callPackage; } self // {