This is just to get to know Foundry. This branch
does not hold any actual implementation apart from things which were automatically set up with
forge init
.
This repo provides a file 1. To get going you have to
install~nix. Furthermore,
you have to enable the Flakes feature. On NixOS this is done by
adding something along these lines to your configuration.nix
:
nix = {
package = pkgs.nixFlakes;
extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes)
"experimental-features = nix-command flakes";
};
See https://nixos.wiki/wiki/Flakes for non-NixOS distributions.
You can now enter a development environment using nix develop
and have all the necessary tools at
your hand. For a smoother developer experience consider using direnv.
Briefly documenting the initialization routine:
- run
forge init --force --no-commit
; forge build --no-auto-detect
andforge test
should now work.
Footnotes
-
The flake machinery used here is based on https://github.com/shazow/foundry.nix. โฉ