{ lib, ... }: with lib; with lib.types; { _file = "haskell.nix/modules/project-common.nix"; options = { # Used by callCabalProjectToNix and callStackToNix name = mkOption { type = nullOr str; default = "haskell-project"; # TODO figure out why `config.src.name or null` breaks hix; description = "Optional name for better error messages"; }; src = mkOption { type = either path package; }; # Default shell arguments shell = mkOption { # TODO make this a submodule type = unspecified; default = {}; description = '' Arguments to use for the default shell `p.shell` (these are passed to p.shellFor). For instance to include `cabal` and `ghcjs` support use shell = { tools.cabal = {}; crossPlatforms = p: [ p.ghcjs ]; } ''; }; }; }