reth.nix 1.1 KB

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