Skip to content

Commit

Permalink
Add hoogle support in flake-parts module
Browse files Browse the repository at this point in the history
  • Loading branch information
nvmd committed Sep 19, 2023
1 parent 143c27a commit 0c16d07
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ ihpFlake:
type = lib.types.path;
};

withHoogle = lib.mkOption {
description = ''
Enable Hoogle support. Adds `hoogle` command to PATH.
'';
type = lib.types.bool;
default = false;
};

dontCheckPackages = lib.mkOption {
description = ''
List of Haskell package names whose tests are skipped during build.
Expand Down Expand Up @@ -166,7 +174,9 @@ ihpFlake:
containers = lib.mkForce {};

languages.haskell.enable = true;
languages.haskell.package = ghcCompiler.ghc.withPackages cfg.haskellPackages;
languages.haskell.package = (if cfg.withHoogle
then ghcCompiler.ghc.withHoogle
else ghcCompiler.ghc.withPackages) cfg.haskellPackages;

languages.haskell.languageServer = ghcCompiler.haskell-language-server;
languages.haskell.stack = null; # Stack is not used in IHP
Expand Down

0 comments on commit 0c16d07

Please sign in to comment.