11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
19 sha256 = "sha256-sq99lJqSJ436wdSjdOlooGD2PysZzbyb7hTfJ9OUg/U=";
22 cargoHash = "sha256-0x/YKPLh5yf3y/CjrQF18yDfPJ8IlArVVczgyVPzpEI=";
24 # buildAndTestSubdir = "cli";
26 nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config rustPlatform.bindgenHook ];
28 # Needed to get openssl-sys to use pkg-config.
29 OPENSSL_NO_VENDOR = 1;
30 OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
31 OPENSSL_DIR="${lib.getDev openssl}";
33 # TODO check why rust compilation fails by including the rocksdb from nixpkgs
34 # Used by build.rs in the rocksdb-sys crate. If we don't set these, it would
35 # try to build RocksDB from source.
36 # ROCKSDB_INCLUDE_DIR="${rocksdb}/include";
37 # ROCKSDB_LIB_DIR="${rocksdb}/lib";
39 buildInputs = lib.optionals stdenv.isDarwin [ Security curl ];
41 # some tests are flaky and some need network access
42 # TODO finish filtering the tests to enable them
43 doCheck = !stdenv.isLinux;
45 # # tries to make a network access
46 # "--skip=rpc::rpc::tests::test_send_transaction_large"
48 # "--skip=helpers::block_requests::tests::test_block_requests_case_2ca"
53 description = "A Decentralized Operating System for Zero-Knowledge Applications";
54 homepage = "https://snarkos.org";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ happysalada ];
57 platforms = platforms.unix;