on iko/ghcjs-patch-master help sign in
force drop boot-pkgs from plan-defs
5a750e0Moritz Angermann
@@ -1,8 +1,22 @@
1+let
2+ # pkg-def's may reference boot packages, but those
3+ # are not guaranteed to be available on hackage, as
4+ # it is a manual process. They might eventually show
5+ # up much later on hackage; but are not installable
6+ # anyway. Therefore we just strip them out of the
7+ # pkg-def's packages.
8+ boot-pkgs = [ "rts" "ghc" "ghci" "ghc-boot" "ghc-boot-th" ];
9+ strip-pkg-def = pkgs: pkg-def: hackage: with pkgs.lib;
10+ mapAttrs (k: v: if k == "packages"
11+ then filterAttrs (k: _: !(builtins.elem k boot-pkgs)) v
12+ else v)
13+ (pkg-def hackage);
14+in
1hackage: let haskell = {
15hackage: let haskell = {
2 compat = import ./compat hackage;
16 compat = import ./compat hackage;
3− mkPkgSet = pkgs: pkg-def: import ./package-set.nix { inherit pkg-def pkgs hackage haskell; };
17+ mkPkgSet = pkgs: pkg-def: import ./package-set.nix { inherit pkgs hackage haskell; pkg-def = strip-pkg-def pkgs pkg-def; };
4 # The *new* pkg set is one that build components.
18 # The *new* pkg set is one that build components.
5 # This also uses the module system for much greater extensibility.
19 # This also uses the module system for much greater extensibility.
6 # To make extend and override things, pass a modules argument to new-package-set.nix
20 # To make extend and override things, pass a modules argument to new-package-set.nix
7− mkNewPkgSet = { pkgs, pkg-def, modules ? [] }@args: import ./new-package-set.nix (args // { inherit hackage; });
21+ mkNewPkgSet = { pkgs, pkg-def, modules ? [] }@args: import ./new-package-set.nix (args // { inherit hackage; pkg-def = strip-pkg-def pkgs pkg-def; });
8}; in haskell
22}; in haskell