mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 06:01:15 +00:00
bb9e23837a
The motivation is to be able to get rid of common configuration when initial packages differs since common configuration assumes a very specific version set. cc @jmitchell @peti
33 lines
916 B
Nix
33 lines
916 B
Nix
{ pkgs, stdenv, ghc, all-cabal-hashes
|
|
, compilerConfig ? (self: super: {})
|
|
, packageSetConfig ? (self: super: {})
|
|
, overrides ? (self: super: {})
|
|
, initialPackages ? import ./hackage-packages.nix
|
|
, configurationCommon ? import ./configuration-common.nix
|
|
, configurationNix ? import ./configuration-nix.nix
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (stdenv.lib) extends makeExtensible;
|
|
inherit (import ./lib.nix { inherit pkgs; }) overrideCabal makePackageSet;
|
|
|
|
haskellPackages = makePackageSet {
|
|
package-set = initialPackages;
|
|
inherit ghc extensible-self;
|
|
};
|
|
|
|
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
|