From 4a93410b770e552df683775f3802bd8de52d25e6 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 17 May 2022 14:48:03 -0400 Subject: [PATCH] Add bin/hoogle --- README.md | 1 + bin/hoogle | 5 +++++ flake.nix | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 bin/hoogle diff --git a/README.md b/README.md index 0ad9bae..87a5105 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ git add . && git commit -m rename - Run `nix flake update` to update all flake inputs. - Run `treefmt` in nix shell to autoformat the project. This uses [treefmt](https://github.com/numtide/treefmt), which uses `./treefmt.toml` (where fourmolu and nixpkgs-fmt are specified). +- Run `bin/hoogle` to start Hoogle with packages in your cabal file. ## Alternatives diff --git a/bin/hoogle b/bin/hoogle new file mode 100755 index 0000000..e19b894 --- /dev/null +++ b/bin/hoogle @@ -0,0 +1,5 @@ +#!/usr/bin/env nix-shell +#! nix-shell -j auto ../shell.nix -i bash +set -xe +echo http://127.0.0.1:8888 +hoogle serve -p 8888 --local \ No newline at end of file diff --git a/flake.nix b/flake.nix index d28daa7..23fb83e 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ inherit returnShellEnv; name = "haskell-template"; root = ./.; - withHoogle = false; + withHoogle = true; overrides = self: super: with pkgs.haskell.lib; { # Use callCabal2nix to override Haskell dependencies here # cf. https://tek.brick.do/K3VXJd8mEKO7