1{ lib, buildGoModule, fetchFromGitHub, nix-update-script }:
2
3let
4 pname = "erigon";
5 version = "2.43.0";
6in
7buildGoModule {
8 inherit pname version;
9
10 src = fetchFromGitHub {
11 owner = "ledgerwatch";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "sha256-3o7vu2bA8lB1CiVaSF6YU9WjwNliQAK5AcGl82GCqFg=";
15 fetchSubmodules = true;
16 };
17
18 vendorSha256 = "sha256-JhMefeUxo9ksyCnNsLgAhGG0Ix7kxCA/cYyiELd0H64=";
19 proxyVendor = true;
20
21 # Build errors in mdbx when format hardening is enabled:
22 # cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
23 hardeningDisable = [ "format" ];
24
25 subPackages = [
26 "cmd/erigon"
27 "cmd/evm"
28 "cmd/rpcdaemon"
29 "cmd/rlpdump"
30 ];
31
32 passthru.updateScript = nix-update-script { };
33
34 meta = with lib; {
35 homepage = "https://github.com/ledgerwatch/erigon/";
36 description = "Ethereum node implementation focused on scalability and modularity";
37 license = with licenses; [ lgpl3Plus gpl3Plus ];
38 maintainers = with maintainers; [ d-xo happysalada ];
39 };
40}