Skip to content

Commit 939a5a9

Browse files
albertodvpiskyd
authored andcommitted
Add documentation for flake introduction
1 parent 03864ad commit 939a5a9

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,48 @@ zig build test --summary all -- src/bip39/bip39.zig src/bip38/bip38.zig
2929

3030
#### Dev Environment
3131

32+
##### Devbox
33+
3234
You can directly use devbox to create a complete dev environment. Check devbox.json and [devbox](https://www.jetify.com/devbox) docs for more information.
3335

3436
``` bash
3537
devbox shell
3638
```
3739

40+
##### Nix + devenv
41+
42+
In order to get a shell with all the tools you need to contribute to this project you can run
43+
44+
```bash
45+
direnv allow
46+
```
47+
48+
This will enable the `direnv` environment that will automatically makes you enter the development shell every time you enter the project directory (or any subdirectory). This uses [nix](https://nixos.org/download/) (with [flakes](https://nixos.wiki/wiki/Flakes)) and [direnv](https://direnv.net).
49+
50+
This command
51+
52+
```bash
53+
nix flake check
54+
```
55+
56+
will run regular checks of the flake, in particular it will run _git hooks_.
57+
This runs in the GHA `flake-check` job.
58+
59+
###### Git hooks
60+
61+
The `nix` shell will install the git hooks automatically.
62+
The pre-commit configuration `.pre-commit-config.yaml` is git-ignored because it will be a simple
63+
link to the `/nix/store`: the semantic is not changing but the location can differ from different
64+
machines/configuration.
65+
66+
You can manually trigger the hooks on all files:
67+
68+
```bash
69+
pre-commit run -a
70+
```
71+
72+
Check the `--help` for more usages.
73+
3874
#### Bitcoin Node
3975

4076
walle needs a bitcoin-core node. You can run one using the Dockerfile. The configuration is defined in node/bitcoin.conf and it is used to create a regtest network.

0 commit comments

Comments
 (0)