reth
reth copied to clipboard
Addition of a Flake.nix for Reth
For those unfamiliar with the Nix Package Manager, this is a Nix based file, with various features. Within this PR I made a working Proof of Concept for Reth.
Within the file, there are two features of the flake, a build system and a portable environment.
Seamless Build
- In an isolated environment(dependencies don't interact with other system files)
- Without cloning
Examples
When inside of the reth directory
$ nix build
Without downloading the repo
$ nix build "github:smolPatches/reth?ref=feat/reth-flake"
Portable Environment
- Allows users to easily pull down the dependencies of reth in one go
Required Rust Version, Cargo Dependencies, Clang, etc.
- Seamless environment to experiment w/ building / changing reth code
Examples
When inside of the reth directory
$ nix develop
Without downloading the repo
$ nix develop "github:smolPatches/reth?ref=feat/reth-flake"
Later, I will be making a PR to Nixpkgs as well to add Reth as a Nixpkg for users to install.
NOTE: I edited the rust-version in Cargo.toml because the official Rust Version on Rust's Page is 1.81.0 and I am parsing the Cargo.toml to select the right version of Rust to use within the Flake.
rustPlatform = pkgs.makeRustPlatform {
rustc = pkgs.rust-bin.stable."${rustVersion}".default;
cargo = pkgs.rust-bin.stable."${rustVersion}".default;
};