guide/src/contributing/nix-shell.md
The nannou repo offers a Nix shell as a way of providing a reproducible environment across both macOS and Linux. This simplifies the nannou repo CI a little while making it easier to experiment with nannou using a known working environment.
The Determinate Systems installer is one of the easiest ways to get started with Nix.
nix build. Whennannou package and
devShell.nannou DependencyWhen adding a new package (e.g. system dependency):
nix search nixpkgs <name> is handy)default.nix input attribute set.buildInputs if its a runtime dependency, or
nativeBuildInputs if its a build-time dependency.To add handy development dependencies (e.g. rustfmt, rust-analyser), do the same
but add them to shell.nix instead.
Add these to the env attributes within either default.nix or shell.nix.
Build all binaries, examples and dylibs within the nannou workspace with
nix build. When finished, look in the result symlink directory to find all
of the built binaries.
devShellTo enter a development shell with all of the tools and env vars necessary for
nannou dev, use nix develop.
To quickly enter a nannou dev shell to build a downstream nannou project, you
can use: nix develop github:nannou-org/nannou.