Development

This guide explains the steps and requirements for developing Bank-Vaults projects.

Quick start

Install Nix:

sh <(curl -L https://nixos.org/nix/install) --daemon

Install direnv:

curl -sfL https://direnv.net/install.sh | bash

Load direnv to your shell:

eval "\$(direnv hook bash)"

Don’t forget to add the above line to your shell rc file.

Clone a project and enter its directory, then run:

direnv allow

You are ready to go!

Development environment

Bank-Vaults uses Nix to create a portable development environment across developer machines and CI, ensuring a certain level of reproducibility and minimizing environmental issues during development.

Follow the official installation instructions to download and install Nix.

Alternatively, you can use this installer by Determinate Systems.

In addition to Nix, you also need to install direnv by following the installation instructions.

Follow the onscreen instructions to add direnv’s hook to your shell. You may also need to restart your shell.

After installing both Nix and direnv, you will be ready to develop Bank-Vaults projects.

Check out one of the repositories and run direnv allow upon entering the directory. (You only need to do this the first time, and then every time the .envrc file in the project changes.)

Each project should have additional development information in its README, but generally, you will find a Makefile in each project with the necessary targets for development.

Finally, each project contains instructions on how to develop the project without using Nix. However, these instructions are offered as a best-effort basis and may not always work, as maintainers do not test them regularly.