Skip to content

Commit

Permalink
docs(nix): Add nix section to contrib guide (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
metame committed Apr 24, 2024
1 parent 392f3aa commit d8754f6
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ welcomed! This includes:

### Installing from Sources

#### Opam

To install Riot from sources, make sure to include all its dependencies:

```sh
Expand All @@ -30,12 +32,36 @@ You can run builds with:
; dune build
```

You can run all tests with
You can run all tests with:

```sh
; dune test
```

#### Nix

The only requirement is that you have nix installed with flakes enabled.

To build the project you can run:

```sh
; nix build
```

To enter a dev shell with all deps, utop, lsp, and dune installed, simply run:

```sh
; nix develop
```

Or if you're using direnv:

```sh
; echo 'use flake' >> .envrc && direnv allow
```

An example repo for creating new projects using riot and nix intended for those new to nix can be found [here](https://github.com/metame/nix_riot_example).

### Adding tests

If you want to add a test, you can do so by creating a new OCaml file in the
Expand Down

0 comments on commit d8754f6

Please sign in to comment.