Skip to content

nix-community/ethereum.nix

ethereum.nix = Ethereum 🫶 Nix

Ethereum Ecosystem Built with nix License

This is an experimental Nix project for integrating the most interesting / important projects in the Ethereum ecosystem as Nix packages / NixOS modules.

Many of the packages found on ethereum.nix will be added to nixpkgs repository once they're stable / mature enough. But for some others, more experimental ones, they can reside here.

This project is developed entirely in Nix Flakes (but it offers compatiblity with legacy Nix thanks to flake-compat).

Documentation

We recommend you to have a look at our documentation that shows how to use ethereum.nix effectively.

Any PR improving documentation is welcomed.

Development

We are using devshell to have nice development environments. When prompted run direnv allow and you will then be met with the following prompt:

🔨 Welcome to ethereum.nix

[Docs]

  docs-build - Build docs
  docs-serve - Serve docs

[Testing]

  test       - Build and run a test

[Tools]

  fmt        - Format the source tree

[general commands]

  menu       - prints this menu

direnv: export +DEVSHELL_DIR +IN_NIX_SHELL +NIXPKGS_PATH +PRJ_DATA_DIR +PRJ_ROOT +name ~PATH ~XDG_DATA_DIRS

Requirements

To make the most of this repo you should have the following installed:

Docs

To build the docs locally run docs-build. The output will be inside of ./result.

To serve the docs locally (after building them previously) run docs-serve. You can edit the docs in ./docs.

Running tests

To run all tests you can use check (alias for nix flake check), it will build all packages and run all tests.

To execute a specific test you can use tests -h which will provide more information.

Formatting

You can manually format the source using the fmt command.

Contribute

We welcome any kind of contribution or support to this project but before to do so:

  • Make sure you have read the contribution guide for more details on how to submit a good PR (pull request).

In addition you can always:

Acknowledgements

This project has been inspired by the awesome work of:

  • cosmos.nix by Informal Systems which this repository takes inspiration on it's README and several other places.

  • willruggiano on his work done in eth-nix repository that served as the initial kick-start for working on this project.