1{ lib, config, pkgs, haskellLib, ... }:
4let readIfExists = src: fileName:
5 let origSrcDir = src.origSrcSubDir or src;
7 if builtins.elem ((__readDir origSrcDir)."${fileName}" or "") ["regular" "symlink"]
8 then __readFile (origSrcDir + "/${fileName}")
11 _file = "haskell.nix/modules/cabal-project.nix";
13 # Used by callCabalProjectToNix
14 compiler-nix-name = mkOption {
16 description = "The name of the ghc compiler to use eg. \"ghc884\"";
18 index-state = mkOption {
21 description = "Hackage index-state, eg. \"2019-10-10T00:00:00Z\"";
23 index-sha256 = mkOption {
26 description = "The hash of the truncated hackage index-state";
28 plan-sha256 = mkOption {
31 description = "The hash of the plan-to-nix output (makes the plan-to-nix step a fixed output derivation)";
33 materialized = mkOption {
34 type = nullOr (either path package);
36 description = "Location of a materialized copy of the nix files";
38 checkMaterialization = mkOption {
41 description = "If true the nix files will be generated used to check plan-sha256 and material";
43 cabalProjectFileName = mkOption {
45 default = "cabal.project";
47 cabalProject = mkOption {
49 default = readIfExists config.src config.cabalProjectFileName;
51 cabalProjectLocal = mkOption {
53 default = readIfExists config.src "${config.cabalProjectFileName}.local";
55 cabalProjectFreeze = mkOption {
57 default = readIfExists config.src "${config.cabalProjectFileName}.freeze";
61 default = "callCabalProjectToNix";
62 description = "Name of the calling function for better warning messages";
65 type = nullOr package;
67 description = "Deprecated in favour of `compiler-nix-name`";
69 ghcOverride = mkOption {
70 type = nullOr package;
72 description = "Used when we need to set ghc explicitly during bootstrapping";
74 # The defaults for `nix-tools` and `cabal-install` are in `call-cabal-project-to-nix.nix`
75 # to make sure it is not evaluated too strictly (which would lead to infinite recursion).
76 nix-tools = mkOption {
77 type = nullOr package;
79 description = "nix-tools to use when converting the `plan.json` to nix";
81 cabal-install = mkOption {
82 type = nullOr package;
84 description = "cabal-install to use when running `cabal configure`";
86 configureArgs = mkOption {
90 Extra arguments to pass to `cabal v2-configure`.
91 `--enable-tests --enable-benchmarks` are included by default.
92 If the tests and benchmarks are not needed and they
93 cause the wrong plan to be chosen, then we can use
94 `configureArgs = "--disable-tests --disable-benchmarks";`
97 sha256map = mkOption {
98 type = nullOr unspecified;
101 An alternative to adding `--sha256` comments into the
104 { "https://github.com/jgm/pandoc-citeproc"."0.17"
105 = "0dxx8cp2xndpw3jwiawch2dkrkp15mil7pyx7dvd810pwc22pm2q"; };
108 lookupSha256 = mkOption {
109 type = nullOr unspecified;
110 default = if config.sha256map != null
111 then { location, tag, ...}: config.sha256map.${location}.${tag}
114 extra-hackage-tarballs = mkOption {
115 type = nullOr (listOf unspecified);
119 # Used by mkCabalProjectPkgSet
120 pkg-def-extras = mkOption {
121 type = nullOr (listOf unspecified);
125 type = nullOr (listOf unspecified);
128 extra-hackages = mkOption {
129 type = nullOr (listOf unspecified);
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