nixpkgs/pkgs/development/haskell-modules/default.nix
Bas van Dijk 7b49b870cb
haskell: have a dedicated file for non Hackage packages
We had a few "overrides" in configuration-common.nix that were really
extensions. They introduced packages that weren't in hackage-packages.nix.

The advantage of having a dedicated file for these packages is that we can still
place Nix-specific overrides to these packages in configuration-nix.nix. We
weren't able do this before because configuration-nix.nix extended only the
packages from hackage-packages.nix.
2018-10-12 14:12:29 +02:00

37 lines
1.1 KiB
Nix

{ pkgs, stdenv, lib, haskellLib, ghc, all-cabal-hashes
, buildHaskellPackages
, compilerConfig ? (self: super: {})
, packageSetConfig ? (self: super: {})
, overrides ? (self: super: {})
, initialPackages ? import ./initial-packages.nix
, nonHackagePackages ? import ./non-hackage-packages.nix
, configurationCommon ? import ./configuration-common.nix
, configurationNix ? import ./configuration-nix.nix
}:
let
inherit (lib) extends makeExtensible;
inherit (haskellLib) makePackageSet;
haskellPackages = pkgs.callPackage makePackageSet {
package-set = initialPackages;
inherit stdenv haskellLib ghc buildHaskellPackages extensible-self all-cabal-hashes;
};
commonConfiguration = configurationCommon { inherit pkgs haskellLib; };
nixConfiguration = configurationNix { inherit pkgs haskellLib; };
extensible-self = makeExtensible
(extends overrides
(extends packageSetConfig
(extends compilerConfig
(extends commonConfiguration
(extends nixConfiguration
(extends nonHackagePackages
haskellPackages))))));
in
extensible-self