reth.nix 1.1 KB

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