1 { pkgs, stdenv, lib, haskellLib, ghc, all-cabal-hashes
3 , compilerConfig ? (self: super: {})
4 , packageSetConfig ? (self: super: {})
5 , overrides ? (self: super: {})
6 , initialPackages ? import ./initial-packages.nix
7 , nonHackagePackages ? import ./non-hackage-packages.nix
8 , configurationCommon ? import ./configuration-common.nix
9 , configurationNix ? import ./configuration-nix.nix
10 , configurationArm ? import ./configuration-arm.nix
11 , configurationDarwin ? import ./configuration-darwin.nix
12 , configurationJS ? import ./configuration-ghcjs-9.x.nix
17 inherit (lib) extends makeExtensible;
18 inherit (haskellLib) makePackageSet;
20 haskellPackages = pkgs.callPackage makePackageSet {
21 package-set = initialPackages;
22 inherit stdenv haskellLib ghc extensible-self all-cabal-hashes;
24 # Prevent `pkgs/top-level/release-attrpaths-superset.nix` from recursing here.
25 buildHaskellPackages = buildHaskellPackages // { __attrsFailEvaluation = true; };
28 platformConfigurations = lib.optionals stdenv.hostPlatform.isAarch [
29 (configurationArm { inherit pkgs haskellLib; })
30 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
31 (configurationDarwin { inherit pkgs haskellLib; })
32 ] ++ lib.optionals stdenv.hostPlatform.isGhcjs [
33 (configurationJS { inherit pkgs haskellLib; })
37 extensions = lib.composeManyExtensions ([
38 (nonHackagePackages { inherit pkgs haskellLib; })
39 (configurationNix { inherit pkgs haskellLib; })
40 (configurationCommon { inherit pkgs haskellLib; })
41 ] ++ platformConfigurations ++ [
47 extensible-self = makeExtensible (extends extensions haskellPackages);