reth.nix 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. lib,
  3. }:
  4. let
  5. # cargo and rustc packages from 25.11 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-116266.git;
  10. rev = "116266f52682e7b975426c66204b3dada19be502";
  11. shallow = true;
  12. };
  13. pkgs = import pinnedPkgs {};
  14. in
  15. pkgs.rustPlatform.buildRustPackage rec {
  16. pname = "reth";
  17. version = "2.1.0";
  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-//UOHtknfhq33bA3/xzwS0K9FPbn4Tkwx3kkNuluoAM=";
  25. doCheck = false;
  26. doInstallCheck = false;
  27. nativeBuildInputs = [
  28. pkgs.perl
  29. pkgs.clang
  30. pkgs.libclang
  31. pkgs.rustc
  32. pkgs.cargo
  33. ];
  34. env.LIBCLANG_PATH = pkgs.libclang.lib + "/lib/";
  35. meta = with lib; {
  36. description = "Rust Ethereum daemon";
  37. homepage = "https://github.com/paradigmxyz/reth";
  38. license = licenses.mit;
  39. mainProgram = "reth";
  40. };
  41. }