2020-02-15 02:31:42 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, cmake
|
|
|
|
, llvmPackages
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
2020-10-01 01:16:27 +02:00
|
|
|
, stdenv
|
2020-02-15 02:31:42 +01:00
|
|
|
, systemd
|
2020-10-01 01:16:27 +02:00
|
|
|
, darwin
|
2020-02-15 02:31:42 +01:00
|
|
|
}:
|
|
|
|
|
2021-05-15 22:40:50 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-08-01 08:01:08 +02:00
|
|
|
pname = "openethereum";
|
2021-05-15 22:40:50 +02:00
|
|
|
version = "3.2.6";
|
2020-02-15 02:31:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-08-01 08:01:08 +02:00
|
|
|
owner = "openethereum";
|
|
|
|
repo = "openethereum";
|
2020-02-15 02:31:42 +01:00
|
|
|
rev = "v${version}";
|
2021-05-15 22:40:50 +02:00
|
|
|
sha256 = "0lxps3cyg8dzb9qr1kg91s9jc3mnm6hxybwcbhva38pcq4yc40xc";
|
2020-02-15 02:31:42 +01:00
|
|
|
};
|
|
|
|
|
2021-05-15 22:40:50 +02:00
|
|
|
cargoSha256 = "08yrpls3szmw6vy2c4d6b1k907ga0809ylvyx0zb6f8mp8z7ahl2";
|
2020-02-15 02:31:42 +01:00
|
|
|
|
2021-05-06 05:15:18 +02:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-02-15 02:31:42 +01:00
|
|
|
|
2020-10-01 01:16:27 +02:00
|
|
|
buildInputs = [ openssl ]
|
2021-01-15 14:21:58 +01:00
|
|
|
++ lib.optionals stdenv.isLinux [ systemd ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ darwin.Security ];
|
2020-02-15 02:31:42 +01:00
|
|
|
|
|
|
|
cargoBuildFlags = [ "--features final" ];
|
|
|
|
|
2021-01-21 09:26:23 +01:00
|
|
|
# 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";
|
2020-02-15 02:31:42 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast, light, robust Ethereum implementation";
|
2020-08-01 08:01:08 +02:00
|
|
|
homepage = "http://parity.io/ethereum";
|
2020-02-15 02:31:42 +01:00
|
|
|
license = licenses.gpl3;
|
2021-08-21 13:02:24 +02:00
|
|
|
maintainers = with maintainers; [ akru ];
|
2021-01-15 14:21:58 +01:00
|
|
|
platforms = lib.platforms.unix;
|
2020-02-15 02:31:42 +01:00
|
|
|
};
|
|
|
|
}
|