2018-07-04 12:18:21 +01:00
|
|
|
{ pkgs, stdenv, lib, haskellLib, ghc, all-cabal-hashes
|
2018-01-04 21:18:02 +00:00
|
|
|
, buildHaskellPackages
|
2015-09-16 08:19:56 +01:00
|
|
|
, compilerConfig ? (self: super: {})
|
2015-01-07 19:31:32 +00:00
|
|
|
, packageSetConfig ? (self: super: {})
|
|
|
|
, overrides ? (self: super: {})
|
2017-12-22 15:12:53 +00:00
|
|
|
, initialPackages ? import ./initial-packages.nix
|
2018-08-25 14:24:41 +01:00
|
|
|
, nonHackagePackages ? import ./non-hackage-packages.nix
|
2017-06-22 12:24:11 +01:00
|
|
|
, configurationCommon ? import ./configuration-common.nix
|
|
|
|
, configurationNix ? import ./configuration-nix.nix
|
2021-05-08 12:55:59 +01:00
|
|
|
, configurationArm ? import ./configuration-arm.nix
|
2021-05-08 16:32:54 +01:00
|
|
|
, configurationDarwin ? import ./configuration-darwin.nix
|
2015-01-07 19:31:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2017-08-01 17:44:08 +01:00
|
|
|
inherit (lib) extends makeExtensible;
|
2018-07-20 20:36:12 +01:00
|
|
|
inherit (haskellLib) makePackageSet;
|
2016-06-11 18:21:19 +01:00
|
|
|
|
2017-08-01 17:44:08 +01:00
|
|
|
haskellPackages = pkgs.callPackage makePackageSet {
|
2017-05-30 19:27:32 +01:00
|
|
|
package-set = initialPackages;
|
2018-03-26 01:39:38 +01:00
|
|
|
inherit stdenv haskellLib ghc buildHaskellPackages extensible-self all-cabal-hashes;
|
2017-04-12 18:28:06 +01:00
|
|
|
};
|
2015-01-07 19:31:32 +00:00
|
|
|
|
2021-05-08 12:55:59 +01:00
|
|
|
isArm = with stdenv.hostPlatform; isAarch64 || isAarch32;
|
|
|
|
platformConfigurations = lib.optionals isArm [
|
|
|
|
(configurationArm { inherit pkgs haskellLib; })
|
2021-05-08 16:32:54 +01:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
(configurationDarwin { inherit pkgs haskellLib; })
|
2021-05-08 12:55:59 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
extensions = lib.composeManyExtensions ([
|
2021-05-07 18:25:35 +01:00
|
|
|
nonHackagePackages
|
|
|
|
(configurationNix { inherit pkgs haskellLib; })
|
|
|
|
(configurationCommon { inherit pkgs haskellLib; })
|
2021-05-08 12:55:59 +01:00
|
|
|
] ++ platformConfigurations ++ [
|
2021-05-07 18:25:35 +01:00
|
|
|
compilerConfig
|
|
|
|
packageSetConfig
|
|
|
|
overrides
|
2021-05-08 12:55:59 +01:00
|
|
|
]);
|
2015-01-07 19:31:32 +00:00
|
|
|
|
2021-05-07 18:25:35 +01:00
|
|
|
extensible-self = makeExtensible (extends extensions haskellPackages);
|
2017-09-29 14:11:26 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
extensible-self
|