nixpkgs/pkgs/applications/blockchains/openethereum/default.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

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