From 477c19b38b0f8bbecf196837a0d7476fed656444 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sat, 27 Jan 2024 16:11:05 +1100 Subject: [PATCH] reth: init at 1.3.12 This commit adds `reth`, an Ethereum execution client by Paradigm written in Rust. This package is adapted from the [nix-community/ethereum.nix package][1] with a version update, darwin support, and some slight modifications to better suit the nixpkgs conventions. Closes #249233 [1]: https://github.com/nix-community/ethereum.nix/blob/main/pkgs/by-name/re/reth/default.nix --- pkgs/by-name/re/reth/package.nix | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/re/reth/package.nix diff --git a/pkgs/by-name/re/reth/package.nix b/pkgs/by-name/re/reth/package.nix new file mode 100644 index 000000000000..d2c039e2b338 --- /dev/null +++ b/pkgs/by-name/re/reth/package.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchFromGitHub, + nix-update-script, + rustPlatform, +}: + +rustPlatform.buildRustPackage rec { + pname = "reth"; + version = "1.3.12"; + + src = fetchFromGitHub { + owner = "paradigmxyz"; + repo = pname; + rev = "v${version}"; + hash = "sha256-59XUrMaXMiqSELQX8i7eK4Eo8YfGjPVZHT6q+rxoSPs="; + }; + + cargoHash = "sha256-FHQ+iPcjxwcY7uoZMXlm/lRoVA5E5wRg7qFgJe+VSEc="; + + nativeBuildInputs = [ + rustPlatform.bindgenHook + ]; + + # Some tests fail due to I/O that is unfriendly with nix sandbox. + checkFlags = [ + "--skip=builder::tests::block_number_node_config_test" + "--skip=builder::tests::launch_multiple_nodes" + "--skip=builder::tests::rpc_handles_none_without_http" + "--skip=cli::tests::override_trusted_setup_file" + "--skip=cli::tests::parse_env_filter_directives" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Modular Ethereum execution client in Rust by Paradigm"; + homepage = "https://github.com/paradigmxyz/reth"; + license = with lib.licenses; [ + mit + asl20 + ]; + mainProgram = "reth"; + maintainers = with lib.maintainers; [ mitchmindtree ]; + platforms = lib.platforms.unix; + }; +}