about summary refs log tree commit diff
path: root/pkgs/applications/networking/coreth
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2022-12-30 17:38:17 +0000
committerColin Arnott <colin@urandom.co.uk>2022-12-31 23:29:27 +0000
commit7bfbdc5fdaaf8c47d9361a8bc81a37c8b5210bc4 (patch)
treeee723f01ec8b888ca4faeac4d68d8ca8363cc422 /pkgs/applications/networking/coreth
parent8ba56d7c0d7490680f2d51ba46a141eca7c46afa (diff)
coreth: init at 0.11.5
Updates #208032
Diffstat (limited to 'pkgs/applications/networking/coreth')
-rw-r--r--pkgs/applications/networking/coreth/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/networking/coreth/default.nix b/pkgs/applications/networking/coreth/default.nix
new file mode 100644
index 0000000000000..0bc782786096d
--- /dev/null
+++ b/pkgs/applications/networking/coreth/default.nix
@@ -0,0 +1,49 @@
+{ buildGoModule
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+buildGoModule rec {
+  pname = "coreth";
+  version = "0.11.5";
+
+  src = fetchFromGitHub {
+    owner = "ava-labs";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-tXwcwMNSrjgQOXcEIucEZjpmPL0cvgYPOV4CMU51Bz8=";
+  };
+
+  # go mod vendor has a bug, see: golang/go#57529
+  proxyVendor = true;
+
+  vendorHash = "sha256-Wd0m/Bcbn3so0mh83tTfebfOBn51MiAxF3Azmu6ZA0o=";
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/ava-labs/coreth/plugin/evm.Version=${version}"
+    "-X github.com/ava-labs/coreth/cmd/abigen.gitCommit=${version}"
+    "-X github.com/ava-labs/coreth/cmd/abigen.gitDate=1970-01-01"
+  ];
+
+  subPackages = [
+    "cmd/abigen"
+    "plugin"
+  ];
+
+  postInstall = "mv $out/bin/{plugin,evm}";
+
+  meta = with lib; {
+    description = "Code and wrapper to extract Ethereum blockchain functionalities without network/consensus, for building custom blockchain services";
+    homepage = "https://github.com/ava-labs/coreth";
+    changelog = "https://github.com/ava-labs/coreth/releases/tag/v${version}";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ urandom ];
+    # In file included from ../go/pkg/mod/github.com/zondax/hid@v0.9.1-0.20220302062450-5552068d2266/hid_enabled.go:38:
+    # ./hidapi/mac/hid.c:693:34: error: use of undeclared identifier 'kIOMainPortDefault'
+    #     entry = IORegistryEntryFromPath(kIOMainPortDefault, path);
+    broken = stdenv.isDarwin;
+  };
+}