on 8a32c39 help sign in
haskell.nix/modules/stack-project.nix
99 lines 2.8 kB history raw
1{ lib, config, pkgs, haskellLib, ... }:
2with lib;
3with types;
4{
5 _file = "haskell.nix/modules/stack-project.nix";
6 options = {
7 # Used by callStackToNix
8 stackYaml = mkOption {
9 type = str;
10 default = "stack.yaml";
11 };
12 ignorePackageYaml = mkOption {
13 type = bool;
14 default = false;
15 };
16 cache = mkOption {
17 type = nullOr unspecified;
18 default = null;
19 };
20 stack-sha256 = mkOption {
21 type = nullOr str;
22 default = null;
23 };
24 resolverSha256 = mkOption {
25 type = nullOr str;
26 default = null;
27 };
28 materialized = mkOption {
29 type = nullOr (either path package);
30 default = null;
31 description = "Location of a materialized copy of the nix files";
32 };
33 checkMaterialization = mkOption {
34 type = nullOr bool;
35 default = null;
36 description = "If true the nix files will be generated used to check plan-sha256 and material";
37 };
38 caller = mkOption {
39 type = str;
40 default = "callCabalProjectToNix";
41 description = "Name of the calling function for better warning messages";
42 };
43 nix-tools = mkOption {
44 type = nullOr package;
45 default = pkgs.evalPackages.haskell-nix.internal-nix-tools;
46 description = "nix-tools to use when converting the `plan.json` to nix";
47 };
49 # Used by mkStackPkgSet
50 pkg-def-extras = mkOption {
51 type = nullOr (listOf unspecified);
52 default = [];
53 };
54 modules = mkOption {
55 type = nullOr (listOf unspecified);
56 default = [];
57 };
58 extra-hackages = mkOption {
59 type = nullOr (listOf unspecified);
60 default = [];
61 };
63 # Used in stack-cache-generator.nix
64 sha256map = mkOption {
65 type = nullOr unspecified;
66 default = null;
67 description = ''
68 An alternative to adding `# nix-sha256:` comments into the
69 stack.yaml file:
70 sha256map =
71 { "https://github.com/jgm/pandoc-citeproc"."0.17"
72 = "0dxx8cp2xndpw3jwiawch2dkrkp15mil7pyx7dvd810pwc22pm2q"; };
73 '';
74 };
75 branchMap = mkOption {
76 type = nullOr unspecified;
77 default = null;
78 description = "A way to specify in which branch a git commit can be found";
79 };
80 lookupBranch = mkOption {
81 type = nullOr unspecified;
82 default = if config.branchMap != null
83 then { location, tag, ...}: config.branchMap.${location}.${tag} or null
84 else _: null;
85 };
87 # Used by stackProject itself
88 compiler-nix-name = mkOption {
89 type = nullOr str;
90 description = "The name of the ghc compiler to use eg. \"ghc884\"";
91 default = null;
92 };
93 ghc = mkOption {
94 type = nullOr package;
95 default = null;
96 description = "Deprecated in favour of `compiler-nix-name`";
97 };
98 };