1 { lib, fetchFromGitLab, stdenv, llvmPackages_12, cargo, libiconv }:
3 stdenv.mkDerivation rec {
5 pname = "tezos-rust-libs";
6 src = fetchFromGitLab {
8 repo = "tezos-rust-libs";
10 sha256 = "sha256-SuCqDZDXmWdGI/GN+3nYcUk66jnW5FQQaeTB76/rvaw=";
13 nativeBuildInputs = [ llvmPackages_12.llvm cargo ];
14 propagatedBuildDeps = [ llvmPackages_12.libllvm ];
15 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
21 --target-dir target-librustzcash \
22 --package librustzcash \
26 --target-dir target-wasmer \
27 --package wasmer-c-api \
28 --no-default-features \
29 --features singlepass,cranelift,wat,middlewares,universal \
38 mkdir -p $out/lib/tezos-rust-libs/rust
39 cp "librustzcash/include/librustzcash.h" \
40 "target-librustzcash/release/librustzcash.a" \
41 "wasmer-2.3.0/lib/c-api/wasm.h" \
42 "wasmer-2.3.0/lib/c-api/wasmer.h" \
43 "target-wasmer/release/libwasmer.a" \
44 "$out/lib/tezos-rust-libs"
45 cp -r "librustzcash/include/rust" "$out/lib/tezos-rust-libs"
50 cargoVendorDir = "./vendor";