Update haskellPackages to use new features of makeOverridable

Instead of manually using `makeExtensible`, which broke `override`.

Fixes #26561
This commit is contained in:
Will Fancher 2017-07-11 22:27:44 -04:00
parent af479c182f
commit e11dbc3710
3 changed files with 30 additions and 34 deletions

View file

@ -7,6 +7,8 @@
, configurationNix ? import ./configuration-nix.nix
}:
self: # Provided by `callPackageWithSelf`
let
inherit (stdenv.lib) extends makeExtensible;
@ -14,19 +16,15 @@ let
haskellPackages = makePackageSet {
package-set = initialPackages;
inherit ghc extensible-self;
extensible-self = self;
inherit ghc;
};
commonConfiguration = configurationCommon { inherit pkgs; };
nixConfiguration = configurationNix { inherit pkgs; };
extensible-self = makeExtensible
(extends overrides
(extends packageSetConfig
(extends compilerConfig
(extends commonConfiguration
(extends nixConfiguration haskellPackages)))));
in
extensible-self
in (extends overrides
(extends packageSetConfig
(extends compilerConfig
(extends commonConfiguration
(extends nixConfiguration haskellPackages))))) self

View file

@ -5481,9 +5481,7 @@ with pkgs;
haskell = callPackage ./haskell-packages.nix { };
haskellPackages = haskell.packages.ghc802.override {
overrides = config.haskellPackageOverrides or (self: super: {});
};
haskellPackages = haskell.packages.ghc802.extend (config.haskellPackageOverrides or (self: super: {}));
inherit (haskellPackages) ghc;

View file

@ -1,4 +1,4 @@
{ pkgs, callPackage, stdenv, buildPlatform, targetPlatform }:
{ pkgs, callPackage, callPackageWithSelf, stdenv, buildPlatform, targetPlatform }:
let # These are attributes in compiler and packages that don't support integer-simple.
integerSimpleExcludes = [
@ -118,79 +118,79 @@ in rec {
packages = {
# Support for this compiler is broken, because it can't deal with directory-based package databases.
# ghc6104 = callPackage ../development/haskell-modules { ghc = compiler.ghc6104; };
ghc6123 = callPackage ../development/haskell-modules {
# ghc6104 = callPackageWithSelf ../development/haskell-modules { ghc = compiler.ghc6104; };
ghc6123 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc6123;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-6.12.x.nix { };
};
ghc704 = callPackage ../development/haskell-modules {
ghc704 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc704;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.0.x.nix { };
};
ghc722 = callPackage ../development/haskell-modules {
ghc722 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc722;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.2.x.nix { };
};
ghc742 = callPackage ../development/haskell-modules {
ghc742 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc742;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.4.x.nix { };
};
ghc763 = callPackage ../development/haskell-modules {
ghc763 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc763;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.6.x.nix { };
};
ghc783 = callPackage ../development/haskell-modules {
ghc783 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc783;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.8.x.nix { };
};
ghc784 = callPackage ../development/haskell-modules {
ghc784 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc784;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.8.x.nix { };
};
ghc7102 = callPackage ../development/haskell-modules {
ghc7102 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc7102;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
};
ghc7103 = callPackage ../development/haskell-modules {
ghc7103 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc7103;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
};
ghc801 = callPackage ../development/haskell-modules {
ghc801 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc801;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
};
ghc802 = callPackage ../development/haskell-modules {
ghc802 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc802;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
};
ghc821 = callPackage ../development/haskell-modules {
ghc821 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc821;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.2.x.nix { };
};
ghcHEAD = callPackage ../development/haskell-modules {
ghcHEAD = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghcHEAD;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
};
# TODO Support for multiple variants here
ghcCross = callPackage ../development/haskell-modules {
ghcCross = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghcHEAD.crossCompiler;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
};
ghcCross821 = callPackage ../development/haskell-modules {
ghcCross821 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghc821.crossCompiler;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.2.x.nix { };
};
ghcjs = callPackage ../development/haskell-modules {
ghcjs = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghcjs;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
};
ghcjsHEAD = callPackage ../development/haskell-modules {
ghcjsHEAD = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghcjsHEAD;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
};
ghcHaLVM240 = callPackage ../development/haskell-modules {
ghcHaLVM240 = callPackageWithSelf ../development/haskell-modules {
ghc = compiler.ghcHaLVM240;
compilerConfig = callPackage ../development/haskell-modules/configuration-halvm-2.4.0.nix { };
};