forked from mirrors/nixpkgs
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";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "tezos";
|
||||
repo = "tezos-rust-libs";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffkzbvb0ls4wk9205g3xh2c26cmwnl68x43gh6dm9z4xsic94v5";
|
||||
sha256 = "sha256-SuCqDZDXmWdGI/GN+3nYcUk66jnW5FQQaeTB76/rvaw=";
|
||||
};
|
||||
|
||||
cargoSha256 = "0dgyqfr3dvvdwdi1wvpd7v9j21740jy4zwrwiwknw7csb4bq9wfx";
|
||||
nativeBuildInputs = [ llvmPackages_12.llvm cargo ];
|
||||
propagatedBuildDeps = [ llvmPackages_12.libllvm ];
|
||||
|
||||
preBuild = ''
|
||||
mkdir .cargo
|
||||
mv cargo-config .cargo/config
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
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 = ''
|
||||
cp -r rustc-bls12-381/include $out/include
|
||||
cp -r librustzcash/include $out
|
||||
cp -r $out/lib $out/tmp
|
||||
mkdir $out/lib/tezos-rust-libs
|
||||
mv $out/tmp/ $out/lib/tezos-rust-libs/
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/tezos-rust-libs/rust
|
||||
cp "librustzcash/include/librustzcash.h" \
|
||||
"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;
|
||||
|
||||
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 ];
|
||||
};
|
||||
cargoVendorDir = "./vendor";
|
||||
}
|
||||
|
|
|
@ -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-gen = callPackage ../development/ocaml-modules/bls12-381/gen.nix { };
|
||||
|
||||
bls12-381-hash = callPackage ../development/ocaml-modules/bls12-381-hash { };
|
||||
|
||||
bls12-381-signature = callPackage ../development/ocaml-modules/bls12-381-signature { };
|
||||
|
|
Loading…
Reference in a new issue