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.
This commit is contained in:
Peter Simons 2015-02-08 13:22:13 +01:00
parent a14966e827
commit 807146cf75

View file

@ -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 // {