From ff303456dfdf88cd3cf520324f756b3f7b2df9b0 Mon Sep 17 00:00:00 2001 From: Daniel Firth <dan.firth@horizon-haskell.net> Date: Sat, 2 Dec 2023 13:01:21 +0000 Subject: [PATCH] Use horizon-hoogle --- flake.lock | 16 ++++++++++++++++ flake.nix | 14 ++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 821ea8f6..3debe309 100644 --- a/flake.lock +++ b/flake.lock @@ -87,6 +87,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" + } + }, "lint-utils": { "inputs": { "flake-utils": "flake-utils", @@ -229,6 +244,7 @@ "inputs": { "flake-parts": "flake-parts", "horizon-core": "horizon-core", + "horizon-hoogle": "horizon-hoogle", "lint-utils": "lint-utils_2", "nixpkgs": "nixpkgs_4" } diff --git a/flake.nix b/flake.nix index fd4d506b..4a83db7d 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ inputs = { flake-parts.url = "github:hercules-ci/flake-parts"; horizon-core.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-core?ref=lts/ghc-9.4.x"; + horizon-hoogle.url = "git+https://gitlab.horizon-haskell.net/nix/horizon-hoogle"; lint-utils.url = "git+https://gitlab.nixica.dev/nix/lint-utils"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; @@ -29,6 +30,9 @@ "x86_64-darwin" "x86_64-linux" ]; + imports = [ + inputs.horizon-hoogle.flakeModule + ]; perSystem = { config, system, ... }: let pkgs = nixpkgs.legacyPackages.${system}; @@ -48,19 +52,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-core-hoogle"; - }; - }; - checks = with lint-utils.linters.${system}; { dhall-format = dhall-format { src = self; }; nixpkgs-fmt = nixpkgs-fmt { src = self; find = "flake.nix"; }; -- GitLab