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