Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable the development environment #37

Closed
srid opened this issue Nov 1, 2022 · 1 comment · Fixed by #61
Closed

Option to disable the development environment #37

srid opened this issue Nov 1, 2022 · 1 comment · Fixed by #61
Assignees
Labels
question Further information is requested

Comments

@srid
Copy link
Owner

srid commented Nov 1, 2022

Haskell developers will always remain the primary audience of haskell-flake. For users who just want to package the Haskell app without needing the full-blown development environment, the following configuration is useful:

haskelProjects.default = {
  buildTools = _: {
    cabal-install = null;
    ghcid = null;
    hlint = null;
    haskell-language-server = null;
  };
}

(These just disable the default build tools added by haskell-flake).

However, this configuration does not prevent the addition of devShell itself that is going to remain unused by these users.

From an API standpoint, how can we provide a simpler option to disable the whole development shell and friends for this target audience (non-Haskell developer users)?

@srid srid added the question Further information is requested label Nov 1, 2022
@srid
Copy link
Owner Author

srid commented Nov 1, 2022

Simplest API I can think of,

haskellProjects.<name>.development = false;

... should disable the devShell injection entirely, thus all of buildTools becomes unused. But since buildTools (EDIT: also the check options) now becomes contingent on this new development flag, perhaps we should move it under that as well, viz.:

haskellProjects.default = {
  packages = { };
  overrides = self: super: { };
  development = {
    enable = true; # True by default
    buildTools = hp: {
      ghcid = null;
      fourmolu = hp.fourmolu;
    };
    hlintCheck.enable = true;
    hlsCheck.enable = true;
  };

development = false can also disable the checks; leaving packages only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant