1{ lib, fetchFromGitLab, rustPlatform }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "tezos-rust-libs";
5 version = "1.0";
6
7 src = fetchFromGitLab {
8 owner = "tezos";
9 repo = "tezos-rust-libs";
10 rev = "v${version}";
11 sha256 = "1ffkzbvb0ls4wk9205g3xh2c26cmwnl68x43gh6dm9z4xsic94v5";
12 };
13
14 cargoSha256 = "0dgyqfr3dvvdwdi1wvpd7v9j21740jy4zwrwiwknw7csb4bq9wfx";
15
16 preBuild = ''
17 mkdir .cargo
18 mv cargo-config .cargo/config
19 '';
20
21 postInstall = ''
22 cp -r rustc-bls12-381/include $out/include
23 cp -r librustzcash/include $out
24 cp -r $out/lib $out/tmp
25 mkdir $out/lib/tezos-rust-libs
26 mv $out/tmp/ $out/lib/tezos-rust-libs/
27 '';
28
29 doCheck = true;
30
31 meta = {
32 homepage = "https://gitlab.com/tezos/tezos-rust-libs";
33 description = "Tezos: all rust dependencies and their dependencies";
34 license = lib.licenses.mit;
35 maintainers = [ lib.maintainers.ulrikstrid ];
36 };
37}