mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-10-06 04:17:18 +03:00
26e147db4a
Fixes #24
32 lines
1.2 KiB
Nix
32 lines
1.2 KiB
Nix
let
|
|
# pkg-def's may reference boot packages, but those
|
|
# are not guaranteed to be available on hackage, as
|
|
# it is a manual process. They might eventually show
|
|
# up much later on hackage; but are not installable
|
|
# anyway. Therefore we just strip them out of the
|
|
# pkg-def's packages.
|
|
boot-pkgs = [ "rts" "ghc" "ghci" "ghc-boot" "ghc-boot-th"
|
|
"ghc-heap" # since ghc 8.6.
|
|
];
|
|
strip-pkg-def = pkgs: pkg-def: hackage: with pkgs.lib;
|
|
mapAttrs (k: v: if k == "packages"
|
|
then filterAttrs (k: _: !(builtins.elem k boot-pkgs)) v
|
|
else v)
|
|
(pkg-def hackage);
|
|
in
|
|
hackage: let haskell = rec {
|
|
# ghc hackage patches.
|
|
# these are patches that turn hackage packages into the same as the ones
|
|
# ghc ships with the supposedly same version. See GHC Track Issue: 16199
|
|
ghcHackagePatches = import ./patches;
|
|
|
|
compat = import ./compat.nix;
|
|
|
|
mkPkgSet
|
|
= { pkgs, pkg-def, pkg-def-overlays ? [], modules ? [] }@args:
|
|
import ./package-set.nix (args // { inherit hackage; pkg-def = strip-pkg-def pkgs pkg-def; });
|
|
|
|
mkNewPkgSet = args: builtins.trace "DEPRECATED: use mkPkgSet instead of mkNewPkgSet" (mkPkgSet args);
|
|
|
|
}; in haskell
|