2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, cmake
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
2020-11-12 09:05:59 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, systemd
|
2020-11-12 09:05:59 +00:00
|
|
|
, darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "openethereum";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "3.3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-08-20 17:08:02 +00:00
|
|
|
owner = "openethereum";
|
|
|
|
repo = "openethereum";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-PpRRoufuZ9fXbLonMAo6qaA/jtJZXW98uM0BEXdJ2oU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
cargoSha256 = "sha256-xXUNXQvVq6XqW/hmCfJ2/mHKkZu0amRZ77vX+Jib0iM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
buildInputs = [ openssl ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ systemd ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ darwin.Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildFeatures = [ "final" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +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
|
2022-10-30 15:09:59 +00:00
|
|
|
checkFlags = [ "--skip" "configuration::tests::should_resolve_external_nat_hosts" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fast, light, robust Ethereum implementation";
|
2020-08-20 17:08:02 +00:00
|
|
|
homepage = "http://parity.io/ethereum";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
2021-08-22 07:53:02 +00:00
|
|
|
maintainers = with maintainers; [ akru ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|