haskell-modules: refactor package set

This change is effectively a no-op to nixpkgs. However, it gives users
the flexibility to create and maintain their own package sets per
project, while benefiting from nix's Haskell configurations.

I would make immediate use of this change in stack2nix, a project that
generates nix expressions for all the dependencies of a given Haskell
project. @domenkozar is familiar with the motivations and helped
refine this change
This commit is contained in:
Jacob Mitchell 2017-05-30 11:27:32 -07:00
parent 77e6529953
commit ed6ecacf64

View File

@ -2,6 +2,7 @@
, compilerConfig ? (self: super: {})
, packageSetConfig ? (self: super: {})
, overrides ? (self: super: {})
, initialPackages ? import ./hackage-packages.nix
}:
let
@ -10,7 +11,7 @@ let
inherit (import ./lib.nix { inherit pkgs; }) overrideCabal makePackageSet;
haskellPackages = makePackageSet {
package-set = import ./hackage-packages.nix;
package-set = initialPackages;
inherit ghc;
};