base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / er / erigon / package.nix
blobb5fa4dfe134dc37b9d5f835b8a6c6c96cc62b602
1 { lib, buildGoModule, fetchFromGitHub, nix-update-script }:
3 let
4   pname = "erigon";
5   version = "2.60.6";
6 in
7 buildGoModule {
8   inherit pname version;
10   src = fetchFromGitHub {
11     owner = "ledgerwatch";
12     repo = pname;
13     rev = "v${version}";
14     hash = "sha256-208gJTLaVEikH92ZDEULPtfnKJyZhZCRCDfCxewABK4=";
15     fetchSubmodules = true;
16   };
18   vendorHash = "sha256-TUK7obI1wOXroI1NE1GfIP+NMW909+z92Wpy9B/soY0=";
19   proxyVendor = true;
21   # Build errors in mdbx when format hardening is enabled:
22   #   cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
23   hardeningDisable = [ "format" ];
25   # Fix error: 'Caught SIGILL in blst_cgo_init'
26   # https://github.com/bnb-chain/bsc/issues/1521
27   CGO_CFLAGS = "-O -D__BLST_PORTABLE__";
28   CGO_CFLAGS_ALLOW = "-O -D__BLST_PORTABLE__";
30   subPackages = [
31     "cmd/erigon"
32     "cmd/evm"
33     "cmd/rpcdaemon"
34     "cmd/rlpdump"
35   ];
37   # Matches the tags to upstream's release build configuration
38   # https://github.com/ledgerwatch/erigon/blob/0c0dbe5f3a81cf8f16da8e4838312ab80ebe5302/.goreleaser.yml
39   #
40   # Enabling silkworm also breaks the build as it requires dynamically linked libraries.
41   # If we need it in the future, we should consider packaging silkworm and silkworm-go
42   # as depenedencies explicitly.
43   tags = "-tags=nosqlite,noboltdb,nosilkworm";
45   passthru.updateScript = nix-update-script { };
47   meta = with lib; {
48     homepage = "https://github.com/ledgerwatch/erigon/";
49     description = "Ethereum node implementation focused on scalability and modularity";
50     license = with licenses; [ lgpl3Plus gpl3Plus ];
51     maintainers = with maintainers; [ d-xo happysalada ];
52   };