1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5}:
6
7buildGoModule rec {
8 pname = "coreth";
9 version = "0.15.2";
10
11 src = fetchFromGitHub {
12 owner = "ava-labs";
13 repo = "coreth";
14 rev = "v${version}";
15 hash = "sha256-YPL/CJIAB/hkUrvyY0jcHWNKry6ddeO2mpxBiutNNMU=";
16 };
17
18 # go mod vendor has a bug, see: golang/go#57529
19 proxyVendor = true;
20
21 vendorHash = "sha256-SGOg2xHWcwJc4j6RcR2KaicXrBkwY2PtknVEvQtatGs=";
22
23 ldflags = [
24 "-s"
25 "-w"
26 "-X github.com/ava-labs/coreth/plugin/evm.Version=${version}"
27 "-X github.com/ava-labs/coreth/cmd/abigen.gitCommit=${version}"
28 "-X github.com/ava-labs/coreth/cmd/abigen.gitDate=1970-01-01"
29 ];
30
31 subPackages = [
32 "cmd/abigen"
33 "plugin"
34 ];
35
36 postInstall = "mv $out/bin/{plugin,evm}";
37
38 meta = {
39 description = "Code and wrapper to extract Ethereum blockchain functionalities without network/consensus, for building custom blockchain services";
40 homepage = "https://github.com/ava-labs/coreth";
41 changelog = "https://github.com/ava-labs/coreth/releases/tag/v${version}";
42 license = lib.licenses.lgpl3Only;
43 maintainers = with lib.maintainers; [ urandom ];
44 };
45}