summary refs log tree commit diff
path: root/pkgs/applications/blockchains/openethereum
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/blockchains/openethereum')
-rw-r--r--pkgs/applications/blockchains/openethereum/default.nix34
-rw-r--r--pkgs/applications/blockchains/openethereum/lock.patch20
2 files changed, 18 insertions, 36 deletions
diff --git a/pkgs/applications/blockchains/openethereum/default.nix b/pkgs/applications/blockchains/openethereum/default.nix
index 7d5acc62050..be2373941b3 100644
--- a/pkgs/applications/blockchains/openethereum/default.nix
+++ b/pkgs/applications/blockchains/openethereum/default.nix
@@ -5,44 +5,46 @@
 , llvmPackages
 , openssl
 , pkg-config
+, stdenv
 , systemd
+, darwin
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "openethereum";
-  version = "3.0.1";
+  version = "3.2.6";
 
   src = fetchFromGitHub {
     owner = "openethereum";
     repo = "openethereum";
     rev = "v${version}";
-    sha256 = "08dkcrga1x18csh6pw6f54x5xwijppyjhg46cf4p452xc1l3a6ir";
+    sha256 = "0lxps3cyg8dzb9qr1kg91s9jc3mnm6hxybwcbhva38pcq4yc40xc";
   };
 
-  cargoSha256 = "1xliragihwjfc5qmfm0ng519bw8a28m1w1yqcl9mpk8zywiybaah";
+  cargoSha256 = "08yrpls3szmw6vy2c4d6b1k907ga0809ylvyx0zb6f8mp8z7ahl2";
 
-  cargoPatches = [ ./lock.patch ];
+  nativeBuildInputs = [ cmake pkg-config ];
 
-  LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
-  nativeBuildInputs = [
-    cmake
-    llvmPackages.clang
-    llvmPackages.libclang
-    pkg-config
-  ];
-
-  buildInputs = [ openssl systemd ];
+  buildInputs = [ openssl ]
+    ++ lib.optionals stdenv.isLinux [ systemd ]
+    ++ lib.optionals stdenv.isDarwin [ darwin.Security ];
 
   cargoBuildFlags = [ "--features final" ];
 
-  # test result: FAILED. 88 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out
-  doCheck = false;
+  # Fix tests by preventing them from writing to /homeless-shelter.
+  preCheck = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  # Exclude some tests that don't work in the sandbox
+  # - Nat test requires network access
+  checkFlags = "--skip configuration::tests::should_resolve_external_nat_hosts";
 
   meta = with lib; {
     description = "Fast, light, robust Ethereum implementation";
     homepage = "http://parity.io/ethereum";
     license = licenses.gpl3;
     maintainers = with maintainers; [ akru xrelkd ];
-    platforms = platforms.linux;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/blockchains/openethereum/lock.patch b/pkgs/applications/blockchains/openethereum/lock.patch
deleted file mode 100644
index 66709480bb7..00000000000
--- a/pkgs/applications/blockchains/openethereum/lock.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- /nix/store/hv764a65zmfzw5scjhz5839agv10da6x-source/Cargo.lock	1969-12-31 16:00:01.000000000 -0800
-+++ ./Cargo.lock	2020-07-31 21:30:31.146750066 -0700
-@@ -3113,7 +3113,7 @@
- 
- [[package]]
- name = "openethereum"
--version = "3.0.0"
-+version = "3.0.1"
- dependencies = [
-  "ansi_term",
-  "atty",
-@@ -3562,7 +3562,7 @@
- 
- [[package]]
- name = "parity-version"
--version = "3.0.0"
-+version = "3.0.1"
- dependencies = [
-  "parity-bytes",
-  "rlp",