From 4c3e1568f8c2bb4870f9019793d366fbd79512b3 Mon Sep 17 00:00:00 2001 From: Daniel Firth <dan.firth@horizon-haskell.net> Date: Sat, 2 Dec 2023 13:42:52 +0000 Subject: [PATCH] Use horizon-hoogle --- flake.lock | 16 ++++++++++++++++ flake.nix | 15 ++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 3179092..37de640 100644 --- a/flake.lock +++ b/flake.lock @@ -120,6 +120,21 @@ "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" } }, + "horizon-hoogle": { + "locked": { + "lastModified": 1701521742, + "narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=", + "ref": "refs/heads/master", + "rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e", + "revCount": 2, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + } + }, "horizon-platform": { "inputs": { "flake-parts": "flake-parts_2", @@ -351,6 +366,7 @@ "root": { "inputs": { "flake-parts": "flake-parts", + "horizon-hoogle": "horizon-hoogle", "horizon-platform": "horizon-platform", "lint-utils": "lint-utils_3", "nixpkgs": "nixpkgs_6" diff --git a/flake.nix b/flake.nix index 6751c45..dfdd599 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { flake-parts.url = "github:hercules-ci/flake-parts"; + horizon-hoogle.url = "git+https://gitlab.horizon-haskell.net/nix/horizon-hoogle"; horizon-platform.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-platform"; lint-utils.url = "git+https://gitlab.homotopic.tech/nix/lint-utils"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -24,6 +25,9 @@ "x86_64-darwin" "x86_64-linux" ]; + imports = [ + inputs.horizon-hoogle.flakeModule + ]; perSystem = { pkgs, system, ... }: with pkgs.lib; let @@ -35,20 +39,9 @@ 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-hoogle"; - }; - }; - checks = with lint-utils.outputs.linters.${system}; { dhall-format = dhall-format { src = self; }; nixpkgs-fmt = nixpkgs-fmt { src = self; find = "flake.nix"; }; -- GitLab