summary refs log tree commit diff
path: root/pkgs/applications/blockchains/zcash/librustzcash/default.nix
blob: 526adc715d45a6496255d6969c8f8c9f60487002 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchFromGitHub, rustPlatform }:

rustPlatform.buildRustPackage rec {
  pname = "librustzcash";
  version = "0.1.0";

  src = fetchFromGitHub {
    owner = "zcash";
    repo = "librustzcash";
    rev = version;
    sha256 = "0d28k29sgzrg9clynz29kpw50kbkp0a4dfdayqhmpjmsh05y6261";
  };

  cargoSha256 = "1wzyrcmcbrna6rjzw19c4lq30didzk4w6fs6wmvxp0xfg4qqdlax";

  installPhase = ''
    mkdir -p $out/lib
    cp $releaseDir/librustzcash.a $out/lib/
    mkdir -p $out/include
    cp librustzcash/include/librustzcash.h $out/include/
  '';

  # The tests do pass, but they take an extremely long time to run.
  doCheck = false;

  meta = with stdenv.lib; {
    description = "Rust-language assets for Zcash";
    homepage = "https://github.com/zcash/librustzcash";
    maintainers = with maintainers; [ rht tkerber ];
    license = with licenses; [ mit asl20 ];
    platforms = platforms.unix;
  };
}