depot/third_party/nixpkgs/pkgs/applications/blockchains/openethereum/default.nix
Default email 48af15f7a5 Project import generated by Copybara.
GitOrigin-RevId: 04a2b269d8921505a2969fc9ec25c1f517f2b307
2021-03-20 04:20:00 +00:00

56 lines
1.3 KiB
Nix

{ lib
, fetchFromGitHub
, rustPlatform
, cmake
, llvmPackages
, openssl
, pkg-config
, stdenv
, systemd
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "openethereum";
version = "3.2.1";
src = fetchFromGitHub {
owner = "openethereum";
repo = "openethereum";
rev = "v${version}";
sha256 = "sha256-+bzMo0s+wdp8T/YjPk6mrPSPid1G8WScB8FJhXdL9JQ=";
};
cargoSha256 = "sha256-ibjjJ5zGF6wbO24/RoYKsTYsMNXHb1EdekDwSICPc5g=";
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
nativeBuildInputs = [
cmake
llvmPackages.clang
llvmPackages.libclang
pkg-config
];
buildInputs = [ openssl ]
++ lib.optionals stdenv.isLinux [ systemd ]
++ lib.optionals stdenv.isDarwin [ darwin.Security ];
cargoBuildFlags = [ "--features final" ];
# 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 = lib.platforms.unix;
};
}