|
2 | 2 |
|
3 | 3 | [](https://travis-ci.org/haskell/hackage-server)
|
4 | 4 | [](https://github.com/haskell/hackage-server/actions/workflows/haskell-ci.yml)
|
5 |
| -[](https://github.com/haskell/hackage-server/actions/workflows/nix-shell.yml) |
| 5 | +[](https://github.com/haskell/hackage-server/actions/workflows/nix-flake.yml) |
6 | 6 |
|
7 | 7 | This is the `hackage-server` code. This is what powers <http://hackage.haskell.org>, and many other private hackage instances. The `master` branch is suitable for general usage. Specific policy and documentation for the central hackage instance exists in the `central-server` branch.
|
8 | 8 |
|
9 | 9 | ## Installing dependencies
|
10 | 10 |
|
11 | 11 | `hackage-server` depends on `libgd` and `zlib`. You'll also need `libbrotli-dev` for enabling tests.
|
12 | 12 |
|
13 |
| -### [`nix-shell`](https://nixos.org/manual/nix/stable/command-ref/nix-shell.html) |
| 13 | +### [`nix develop`](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop.html) |
14 | 14 |
|
15 |
| -If you have the [Nix package manager](https://nixos.org/) installed, the easiest way to run `hackage-server` is by using the `nix-shell`. It should be unnecessary to install any dependencies manually. In this repository: |
| 15 | +If you have the [Nix package manager](https://nixos.org/) installed, the easiest way to run `hackage-server` is by using `nix develop`. It should be unnecessary to install any dependencies manually. In this repository: |
16 | 16 |
|
17 |
| - nix-shell --pure |
| 17 | + nix develop |
18 | 18 |
|
19 |
| - [nix-shell]$ cabal v2-run -- hackage-server init |
| 19 | + (in develop shell) |
| 20 | + $ cabal v2-run -- hackage-server init |
20 | 21 |
|
21 |
| - [nix-shell]$ cabal v2-run -- hackage-server run --static-dir=datafiles/ --base-uri=http://127.0.0.1:8080 |
| 22 | + $ cabal v2-run -- hackage-server run --static-dir=datafiles/ --base-uri=http://127.0.0.1:8080 |
22 | 23 | hackage-server: Ready! Point your browser at http://127.0.0.1:8080
|
23 | 24 |
|
| 25 | +`flake.nix` is provided; it uses [`srid/haskell-flake`](https://github.com/srid/haskell-flake). |
| 26 | + |
| 27 | +If you have [direnv](https://direnv.net/), `direnv allow` will load this `nix develop` shell automatically. |
| 28 | + |
| 29 | +`nix build` will build a `hackage-server` executable in `result/`. The Hackage dependencies are provided by the inputs specified in `flake.nix`. Because some of these inputs are unpublished commits on GitHub, this build should not be considered authoritative. |
| 30 | + |
24 | 31 | ### Manually
|
25 | 32 |
|
26 | 33 | You can also install dependencies manually via your operating system's package
|
|
0 commit comments