From fe73b3b4d1e6c74e0b7e049d962b83bb64256677 Mon Sep 17 00:00:00 2001
From: Daniel Firth <dan.firth@horizon-haskell.net>
Date: Sat, 4 Nov 2023 13:41:19 +0000
Subject: [PATCH] add hoogle app

---
 flake.nix | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/flake.nix b/flake.nix
index f57aca3d..fd4d506b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -48,9 +48,19 @@
 
           packages = filterAttrs (_: isDerivation) legacyPackages;
 
+          horizon-hoogle = pkgs.writers.writeBashBin "horizon-hoogle" ''
+            ${legacyPackages.ghcWithHoogle (p: attrValues (packages // { hoogle = null; }))}/bin/hoogle server --local
+          '';
         in
         {
 
+          apps = {
+            run-hoogle = {
+              type = "app";
+              program = "${horizon-hoogle}/bin/horizon-core-hoogle";
+            };
+          };
+
           checks = with lint-utils.linters.${system}; {
             dhall-format = dhall-format { src = self; };
             nixpkgs-fmt = nixpkgs-fmt { src = self; find = "flake.nix"; };
-- 
GitLab