Skip to content

Commit

Permalink
INSTALL.md: add instructions for using the Nix flake (linera-io#1962)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey authored Apr 25, 2024
1 parent 865aa96 commit d5edda2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,35 @@ Alternatively, we have added experimental Nix support (see `flake.nix`).
* `cargo install cargo-sort`
* `cargo install cargo-all-features`
* `cargo install cargo-machete`

# Installation using Nix

Alternatively, this repository contains a Nix flake that can be used
to prepare a reproducible development environment on Nix-enabled
systems.

Nix runs on Linux systems (including the Windows Subsystem for Linux)
and macOS.

If you don't have Nix installed, we recommend using the [Determinate
Nix installer](https://github.com/DeterminateSystems/nix-installer) to
easily set up Nix with flakes support.

Alternatively, you can use [the standard
installer](https://nixos.org/download/) and follow [the
documentation](https://nixos.wiki/wiki/Flakes) to enable flakes
manually.

Once Nix is installed, from the repository root, simply run

```shellsession
$ nix develop
```

to enter a development environment, and then run `cargo build` or
`cargo install` normally.

If you have [direnv](https://direnv.net/) installed, there is no need
to manually run `nix develop`: instead, run `direnv allow` to
automatically drop into the build environment when you enter the
project directory.

0 comments on commit d5edda2

Please sign in to comment.