Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / blockchains / openethereum / default.nix
blob43b24ecd61a1094ae32cd6a371067b27eac4559f
1 { lib
2 , fetchFromGitHub
3 , rustPlatform
4 , cmake
5 , openssl
6 , pkg-config
7 , stdenv
8 , systemd
9 , darwin
12 rustPlatform.buildRustPackage rec {
13   pname = "openethereum";
14   version = "3.3.5";
16   src = fetchFromGitHub {
17     owner = "openethereum";
18     repo = "openethereum";
19     rev = "v${version}";
20     sha256 = "sha256-PpRRoufuZ9fXbLonMAo6qaA/jtJZXW98uM0BEXdJ2oU=";
21   };
23   cargoLock = {
24     lockFile = ./Cargo.lock;
25     outputHashes = {
26       "app_dirs-1.2.1" = "sha256-zn9/b6VUuQ4U7KpN95hWumaKUg+xUdyEBRBngWhHuqA=";
27       "bn-0.4.4" = "sha256-SdlIZwN2AVrq8Ezz0AeLRc+4G/YpqwCpFPS8QqLQ0yU=";
28       "ctrlc-1.1.1" = "sha256-AqJR2B4PnR/fc7N+t2L0zZQ1fYy1GouGKkzupQw8uRQ=";
29       "eth-secp256k1-0.5.7" = "sha256-2ZwY2cODE7AVJ2WBTuHZ01dZXegeNmZHKRUXVemLs1A=";
30       "eth_pairings-0.6.0" = "sha256-2qLyuOArJOH029JKXuyB67p9gggsTRpavW1AO4O93L4=";
31       "ethabi-11.0.0" = "sha256-QVlwdv5iHOhp98rwSZC6b+YFLTdlq3va6YzAZzm8q8Y=";
32       "reth-util-0.1.0" = "sha256-3W8ESWCqEtDuoY2YhB1YVlQXs91XWfuAN2feuv0u6yU=";
33     };
34   };
36   nativeBuildInputs = [ cmake pkg-config ];
38   buildInputs = [ openssl ]
39     ++ lib.optionals stdenv.isLinux [ systemd ]
40     ++ lib.optionals stdenv.isDarwin [ darwin.Security ];
42   buildFeatures = [ "final" ];
44   # Fix tests by preventing them from writing to /homeless-shelter.
45   preCheck = ''
46     export HOME=$(mktemp -d)
47   '';
49   # Exclude some tests that don't work in the sandbox
50   # - Nat test requires network access
51   checkFlags = [ "--skip" "configuration::tests::should_resolve_external_nat_hosts" ];
53   meta = with lib; {
54     broken = stdenv.isDarwin;
55     description = "Fast, light, robust Ethereum implementation";
56     homepage = "http://parity.io/ethereum";
57     license = licenses.gpl3;
58     maintainers = with maintainers; [ akru ];
59     platforms = lib.platforms.unix;
60   };