tezos-rust-libs: 1.0 -> 1.5
This commit is contained in:
parent
7609622aa2
commit
3584ce2fa9
|
@ -1,37 +1,50 @@
|
||||||
{ lib, fetchFromGitLab, rustPlatform }:
|
{ lib, fetchFromGitLab, stdenv, llvmPackages_12, cargo }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
stdenv.mkDerivation rec {
|
||||||
|
version = "1.5";
|
||||||
pname = "tezos-rust-libs";
|
pname = "tezos-rust-libs";
|
||||||
version = "1.0";
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
owner = "tezos";
|
owner = "tezos";
|
||||||
repo = "tezos-rust-libs";
|
repo = "tezos-rust-libs";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1ffkzbvb0ls4wk9205g3xh2c26cmwnl68x43gh6dm9z4xsic94v5";
|
sha256 = "sha256-SuCqDZDXmWdGI/GN+3nYcUk66jnW5FQQaeTB76/rvaw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "0dgyqfr3dvvdwdi1wvpd7v9j21740jy4zwrwiwknw7csb4bq9wfx";
|
nativeBuildInputs = [ llvmPackages_12.llvm cargo ];
|
||||||
|
propagatedBuildDeps = [ llvmPackages_12.libllvm ];
|
||||||
|
|
||||||
preBuild = ''
|
buildPhase = ''
|
||||||
mkdir .cargo
|
runHook preBuild
|
||||||
mv cargo-config .cargo/config
|
|
||||||
|
cargo build \
|
||||||
|
--target-dir target-librustzcash \
|
||||||
|
--package librustzcash \
|
||||||
|
--release
|
||||||
|
|
||||||
|
cargo build \
|
||||||
|
--target-dir target-wasmer \
|
||||||
|
--package wasmer-c-api \
|
||||||
|
--no-default-features \
|
||||||
|
--features singlepass,cranelift,wat,middlewares,universal \
|
||||||
|
--release
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
installPhase = ''
|
||||||
cp -r rustc-bls12-381/include $out/include
|
runHook preInstall
|
||||||
cp -r librustzcash/include $out
|
|
||||||
cp -r $out/lib $out/tmp
|
mkdir -p $out/lib/tezos-rust-libs/rust
|
||||||
mkdir $out/lib/tezos-rust-libs
|
cp "librustzcash/include/librustzcash.h" \
|
||||||
mv $out/tmp/ $out/lib/tezos-rust-libs/
|
"target-librustzcash/release/librustzcash.a" \
|
||||||
|
"wasmer-2.3.0/lib/c-api/wasm.h" \
|
||||||
|
"wasmer-2.3.0/lib/c-api/wasmer.h" \
|
||||||
|
"target-wasmer/release/libwasmer.a" \
|
||||||
|
"$out/lib/tezos-rust-libs"
|
||||||
|
cp -r "librustzcash/include/rust" "$out/lib/tezos-rust-libs"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
cargoVendorDir = "./vendor";
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = "https://gitlab.com/tezos/tezos-rust-libs";
|
|
||||||
description = "Tezos: all rust dependencies and their dependencies";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
{ lib
|
|
||||||
, buildDunePackage
|
|
||||||
, fetchFromGitLab
|
|
||||||
, bls12-381-gen
|
|
||||||
, ctypes
|
|
||||||
, ff-pbt
|
|
||||||
, ff-sig
|
|
||||||
, tezos-rust-libs
|
|
||||||
, zarith
|
|
||||||
, alcotest
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildDunePackage rec {
|
|
||||||
pname = "bls12-381-legacy";
|
|
||||||
|
|
||||||
inherit (bls12-381-gen) version src doCheck;
|
|
||||||
|
|
||||||
duneVersion = "3";
|
|
||||||
|
|
||||||
minimalOCamlVersion = "4.08";
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
bls12-381-gen
|
|
||||||
ctypes
|
|
||||||
ff-pbt
|
|
||||||
ff-sig
|
|
||||||
tezos-rust-libs
|
|
||||||
zarith
|
|
||||||
];
|
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
alcotest
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = "https://gitlab.com/dannywillems/ocaml-bls12-381";
|
|
||||||
description = "UNIX version of BLS12-381 primitives, not implementating the virtual package bls12-381";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -104,7 +104,6 @@ let
|
||||||
|
|
||||||
bls12-381 = callPackage ../development/ocaml-modules/bls12-381 { };
|
bls12-381 = callPackage ../development/ocaml-modules/bls12-381 { };
|
||||||
bls12-381-gen = callPackage ../development/ocaml-modules/bls12-381/gen.nix { };
|
bls12-381-gen = callPackage ../development/ocaml-modules/bls12-381/gen.nix { };
|
||||||
|
|
||||||
bls12-381-hash = callPackage ../development/ocaml-modules/bls12-381-hash { };
|
bls12-381-hash = callPackage ../development/ocaml-modules/bls12-381-hash { };
|
||||||
|
|
||||||
bls12-381-signature = callPackage ../development/ocaml-modules/bls12-381-signature { };
|
bls12-381-signature = callPackage ../development/ocaml-modules/bls12-381-signature { };
|
||||||
|
|
Loading…
Reference in a new issue