reth.nix 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. lib,
  3. pkgs,
  4. rustPlatform,
  5. }:
  6. let
  7. # cargo and rustc packages from 25.05 are out of date,
  8. # so fetch them from a more recent commit:
  9. pinnedPkgs = fetchGit {
  10. url = "https://github.com/NixOS/nixpkgs.git";
  11. # url = /path/to/repo/nixpkgs-fe8997.git;
  12. rev = "fe89979ad5e8fd233ae0aac0e7e56f465945ae70";
  13. shallow = true;
  14. };
  15. pkgs2 = import pinnedPkgs {};
  16. in
  17. rustPlatform.buildRustPackage rec {
  18. pname = "reth";
  19. version = "1.7.0";
  20. src = fetchGit {
  21. url = "https://github.com/paradigmxyz/reth";
  22. # url = /path/to/repo/reth;
  23. ref = "refs/tags/v${version}";
  24. shallow = true;
  25. };
  26. cargoHash = "sha256-2zdilVIHCW0N2yZNfLNoVpTASjXU1ABcZzQLzpAGEsY=";
  27. nativeBuildInputs = [
  28. pkgs.clang
  29. pkgs.libclang
  30. pkgs2.rustc
  31. pkgs2.cargo
  32. ];
  33. env.LIBCLANG_PATH = pkgs.libclang.lib + "/lib/";
  34. meta = with lib; {
  35. description = "Rust Ethereum daemon";
  36. homepage = "https://github.com/paradigmxyz/reth";
  37. license = licenses.mit;
  38. mainProgram = "reth";
  39. };
  40. }