1{ config, pkgs, lib, haskellLib, buildModules, ... }:
3 builder = haskellLib.weakCallPackage pkgs ../builder {
5 ghc = config.ghc.package;
6 inherit (config) nonReinstallablePkgs hsPkgs compiler;
12 # This has a slightly modified option type. We will *overwrite* any previous
13 # setting of nonRelocatablePkgs, instead of merging them. Otherwise you
14 # have no chance of removing packages retroactively. We might improve this
15 # by implementing a logic that would allow +xxx to be added, -xxx to be removed
16 # and if it's not a list of -/+ prefixed strings, be assumed to be overwriting.
18 options.nonReinstallablePkgs = lib.mkOption {
19 type = (lib.types.listOf lib.types.str) // {
20 merge = loc: defs: lib.last (lib.getValues defs);
24 options.reinstallableLibGhc = lib.mkOption {
25 type = lib.types.bool;
27 description = "Is lib:ghc reinstallable?";
29 options.setup-depends = lib.mkOption {
30 type = lib.types.listOf lib.types.unspecified;
32 description = "pkgs to globally provide to Setup.hs builds";
35 # Dependencies (with reinstallable-lib:ghc)
37 # .--------. .------------------.
38 # | pretty | < ------- | template-haskell |
39 # '--------' '------------------'
41 # .---------. .-------. |
42 # | deepseq | - > | array | |
43 # '---------' '-------' v
45 # .----------. .----------. .------. .- | ghc-boot-th |
46 # | ghc-heap | | ghc-prim | | base |< -' '-------------'
47 # '----------' '----------' '------' .----------------.
48 # | v | | | integer-simple |
49 # | .-----. | '-- > |-------or-------|
50 # '---- > | rts | < -----' | integer-gmp |
51 # '-----' '----------------'
53 # without reinstallable-lib:ghc, this is significantly larger.
55 config.nonReinstallablePkgs =
56 [ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
57 "deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
58 # ghcjs custom packages
59 "ghcjs-prim" "ghcjs-th"
61 ++ lib.optionals (!config.reinstallableLibGhc) [
63 "ghc" "Cabal" "Win32" "array" "binary" "bytestring" "containers"
64 "directory" "filepath" "ghc-boot" "ghc-compact" "ghc-prim"
67 "mtl" "parsec" "process" "text" "time" "transformers"
68 "unix" "xhtml" "terminfo"
72 options.bootPkgs = lib.mkOption {
73 type = lib.types.listOf lib.types.str;
78 "ghc-heap" # since ghc 8.6.
79 ] ++ lib.optional (!config.reinstallableLibGhc) "ghc";
81 options.hsPkgs = lib.mkOption {
82 type = lib.types.unspecified;
86 { inherit (builder) shellFor ghcWithPackages ghcWithHoogle;
87 buildPackages = buildModules.config.hsPkgs;
90 (name: pkg: if pkg == null then null else builder.build-package config pkg)
91 (config.packages // lib.genAttrs (config.nonReinstallablePkgs ++ config.bootPkgs) (_: null));
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list