Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(nix): Add nix section to contrib guide #77

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading