From 0c16d077772d9ff816080e9b9ab79aed9f3558f4 Mon Sep 17 00:00:00 2001 From: Sergey Kazenyuk Date: Tue, 19 Sep 2023 02:42:41 +0300 Subject: [PATCH] Add hoogle support in flake-parts module --- flake-module.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/flake-module.nix b/flake-module.nix index 50a14e208..5cdd568e5 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -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. @@ -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