forked from mirrors/nixpkgs
81553124cf
There's no reason to wait for non-binary native to *build* cross ghc, but we want a nix-built GHC for Setup.hs or things won't work.
34 lines
1,003 B
Nix
34 lines
1,003 B
Nix
{ pkgs, stdenv, lib, haskellLib, ghc, all-cabal-hashes
|
|
, buildHaskellPackages
|
|
, compilerConfig ? (self: super: {})
|
|
, packageSetConfig ? (self: super: {})
|
|
, overrides ? (self: super: {})
|
|
, initialPackages ? import ./initial-packages.nix
|
|
, configurationCommon ? import ./configuration-common.nix
|
|
, configurationNix ? import ./configuration-nix.nix
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (lib) extends makeExtensible;
|
|
inherit (haskellLib) overrideCabal makePackageSet;
|
|
|
|
haskellPackages = pkgs.callPackage makePackageSet {
|
|
package-set = initialPackages;
|
|
inherit stdenv haskellLib ghc buildHaskellPackages extensible-self;
|
|
};
|
|
|
|
commonConfiguration = configurationCommon { inherit pkgs haskellLib; };
|
|
nixConfiguration = configurationNix { inherit pkgs haskellLib; };
|
|
|
|
extensible-self = makeExtensible
|
|
(extends overrides
|
|
(extends packageSetConfig
|
|
(extends compilerConfig
|
|
(extends commonConfiguration
|
|
(extends nixConfiguration haskellPackages)))));
|
|
|
|
in
|
|
|
|
extensible-self
|