haskell docs: add explanation of what the --local flag does and the service
This commit is contained in:
parent
ae1e304a60
commit
c17061efd4
@ -334,16 +334,30 @@ navigate there.
|
|||||||
|
|
||||||
Finally, you can run
|
Finally, you can run
|
||||||
```shell
|
```shell
|
||||||
hoogle server -p 8080 --local
|
hoogle server --local -p 8080
|
||||||
```
|
```
|
||||||
and navigate to http://localhost:8080/ for your own local
|
and navigate to http://localhost:8080/ for your own local
|
||||||
[Hoogle](https://www.haskell.org/hoogle/). Note, however, that Firefox and
|
[Hoogle](https://www.haskell.org/hoogle/). The `--local` flag makes the hoogle
|
||||||
possibly other browsers disallow navigation from `http:` to `file:` URIs for
|
server serve files from your nix store over http, without the flag it will use
|
||||||
security reasons, which might be quite an inconvenience. Since version 5 hoogle
|
`file:\\` URIs. Note, however, that Firefox and possibly other browsers
|
||||||
server has a `--local` flag that solves the problem. For older versions see
|
disallow navigation from `http://` to `file://` URIs for security reasons,
|
||||||
|
which might be quite an inconvenience. Versions before v5 did not have this
|
||||||
|
flag. See
|
||||||
[this page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for
|
[this page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for
|
||||||
workarounds.
|
workarounds.
|
||||||
|
|
||||||
|
For NixOS users there's a service which runs this exact command for you.
|
||||||
|
Specify the `packages` you want documentation for and the `haskellPackages` set
|
||||||
|
you want them to come from. Add the following to `configuration.nix`.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
services.hoogle = {
|
||||||
|
enable = true;
|
||||||
|
packages = (hpkgs: with hpkgs; [text cryptonite]);
|
||||||
|
haskellPackages = pkgs.haskellPackages;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
### How to build a Haskell project using Stack
|
### How to build a Haskell project using Stack
|
||||||
|
|
||||||
[Stack](http://haskellstack.org) is a popular build tool for Haskell projects.
|
[Stack](http://haskellstack.org) is a popular build tool for Haskell projects.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user