Skip to content

Commit

Permalink
Update Nix development and build guide (README.md)
Browse files Browse the repository at this point in the history
  • Loading branch information
taimoorzaeem committed Jul 25, 2023
1 parent 630e0a1 commit 5945941
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions nix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,14 @@ for developing, testing and building PostgREST.

## Getting started with Nix

You'll need to [get Nix](https://nixos.org/download.html). The installer will
create your Nix store in the `/nix/` directory, where all build artifacts and
their dependencies will be stored. It will also link the Nix executables like
`nix-env`, `nix-build` and `nix-shell` into your PATH. Nix will manage all
other PostgREST dependencies from here on out. To clean up older build
artifacts from the `/nix/store`, you can run `nix-collect-garbage`.

If you are on a system that does not support nix, for example Windows, you can
run the nix development environment in a docker container. Inside the `nix/`
directory run `docker-compose run --rm nix` to start the docker container. This
will set up the binary cache and launch `nix-shell` automatically.
You'll need to [get Nix](https://nixos.org/download.html). Please follow the recommended installations from the official nix download website unless you know what you are doing.

## Building PostgREST

To build PostgREST from your local checkout of the repository, run:

```bash
nix-build --attr postgrestPackage
$ nix-build --attr postgrestPackage

```

Expand All @@ -39,10 +29,10 @@ We recommend that you use the PostgREST binary cache on

```bash
# Install cachix:
nix-env -iA cachix -f https://cachix.org/api/v1/install
$ nix-env -iA cachix -f https://cachix.org/api/v1/install

# Set cachix up to use the PostgREST binary cache:
cachix use postgrest
$ cachix use postgrest

```

Expand Down

0 comments on commit 5945941

Please sign in to comment.