on 19052d8 help sign in
haskell.nix/modules/project-common.nix
28 lines 846 B history raw
1{ lib, ... }:
2with lib;
3with lib.types;
4{
5 _file = "haskell.nix/modules/project-common.nix";
6 options = {
7 # Used by callCabalProjectToNix and callStackToNix
8 name = mkOption {
9 type = nullOr str;
10 default = "haskell-project"; # TODO figure out why `config.src.name or null` breaks hix;
11 description = "Optional name for better error messages";
12 };
13 src = mkOption {
14 type = either path package;
15 };
16 # Default shell arguments
17 shell = mkOption {
18 # TODO make this a submodule
19 type = unspecified;
20 default = {};
21 description = ''
22 Arguments to use for the default shell `p.shell` (these are passed to p.shellFor).
23 For instance to include `cabal` and `ghcjs` support use
24 shell = { tools.cabal = {}; crossPlatforms = p: [ p.ghcjs ]; }
25 '';
26 };
27 };