summary refs log tree commit diff
path: root/pkgs/applications/blockchains/ethabi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/blockchains/ethabi/default.nix')
-rw-r--r--pkgs/applications/blockchains/ethabi/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/applications/blockchains/ethabi/default.nix b/pkgs/applications/blockchains/ethabi/default.nix
new file mode 100644
index 00000000000..49f34a68bba
--- /dev/null
+++ b/pkgs/applications/blockchains/ethabi/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "ethabi";
+  version = "13.0.0";
+
+  src = fetchFromGitHub {
+    owner = "rust-ethereum";
+    repo = "ethabi";
+    rev = "v${version}";
+    sha256 = "sha256-bl46CSVP1MMYI3tkVAHFrjMFwTt8QoleZCV9pMIMZyc=";
+  };
+
+  cargoSha256 = "sha256-Jz0uEP2/ZjLS+GbCp7lNyJQdFDjTSFthjBdC/Z4tkTs=";
+
+  cargoPatches = [ ./add-Cargo-lock.patch ];
+
+  buildInputs = lib.optional stdenv.isDarwin libiconv;
+
+  meta = with lib; {
+    description = "Ethereum function call encoding (ABI) utility";
+    homepage = "https://github.com/rust-ethereum/ethabi";
+    maintainers = [ maintainers.dbrock ];
+    license = licenses.asl20;
+  };
+}