on iko/ghcjs-patch-master help sign in
force drop boot-pkgs from plan-defs
commit5a750e089068ee0c7f7cd6e62237c02fa47f7293 authorMoritz Angermann <moritz.angermann@gmail.com> dateMon 19 Nov 2018, 12:57 (8 years ago) parent40351aa
1 file changed+16−2
default.nix+16−2
default.nix+16−2
@@ -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
115hackage: let haskell = {
216 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; };
418 # The *new* pkg set is one that build components.
519 # This also uses the module system for much greater extensibility.
620 # 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; });
822}; in haskell