nixpkgs/pkgs/applications/blockchains/erigon/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.6 KiB
Nix
Raw Normal View History

2023-01-14 16:43:57 +00:00
{ lib, buildGoModule, fetchFromGitHub, nix-update-script }:
2020-09-25 09:00:31 +00:00
2022-12-09 14:46:31 +00:00
let
2021-06-08 13:41:43 +00:00
pname = "erigon";
2024-06-10 03:57:11 +00:00
version = "2.60.1";
2023-01-14 16:43:57 +00:00
in
buildGoModule {
inherit pname version;
2020-09-25 09:00:31 +00:00
src = fetchFromGitHub {
owner = "ledgerwatch";
repo = pname;
rev = "v${version}";
2024-06-10 03:57:11 +00:00
hash = "sha256-VZzDG9qUjEBSNxQcmkqPTTDQjh7BZFqyRSaCfio8X2I=";
2022-07-02 11:24:39 +00:00
fetchSubmodules = true;
2020-09-25 09:00:31 +00:00
};
2024-05-16 14:07:57 +00:00
vendorHash = "sha256-38NmSSK3a70WvhZAZ529wdAMlEuk8/4YqtadoLOn1IY=";
2022-01-01 05:05:03 +00:00
proxyVendor = true;
2020-09-25 09:00:31 +00:00
2021-06-08 13:41:43 +00:00
# Build errors in mdbx when format hardening is enabled:
# cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
hardeningDisable = [ "format" ];
# Fix error: 'Caught SIGILL in blst_cgo_init'
# https://github.com/bnb-chain/bsc/issues/1521
CGO_CFLAGS = "-O -D__BLST_PORTABLE__";
CGO_CFLAGS_ALLOW = "-O -D__BLST_PORTABLE__";
2020-09-25 09:00:31 +00:00
subPackages = [
2021-06-08 13:41:43 +00:00
"cmd/erigon"
2021-05-03 20:29:30 +00:00
"cmd/evm"
2020-09-25 09:00:31 +00:00
"cmd/rpcdaemon"
2021-05-03 20:29:30 +00:00
"cmd/rlpdump"
2020-09-25 09:00:31 +00:00
];
2024-03-29 13:24:51 +00:00
# Matches the tags to upstream's release build configuration
# https://github.com/ledgerwatch/erigon/blob/0c0dbe5f3a81cf8f16da8e4838312ab80ebe5302/.goreleaser.yml
#
# Enabling silkworm also breaks the build as it requires dynamically linked libraries.
# If we need it in the future, we should consider packaging silkworm and silkworm-go
# as depenedencies explicitly.
tags = "-tags=nosqlite,noboltdb,nosilkworm";
2023-01-14 16:43:57 +00:00
passthru.updateScript = nix-update-script { };
meta = with lib; {
2021-06-08 13:41:43 +00:00
homepage = "https://github.com/ledgerwatch/erigon/";
description = "Ethereum node implementation focused on scalability and modularity";
2021-05-04 10:59:54 +00:00
license = with licenses; [ lgpl3Plus gpl3Plus ];
2022-09-19 00:56:52 +00:00
maintainers = with maintainers; [ d-xo happysalada ];
2020-09-25 09:00:31 +00:00
};
}