ocamlPackages.bls12-381 (#129509)
ocamlPackages.ff: init at 0.4.0 tezos-rust-libs: init at 1.0 ocamlPackages.bls12-381: init at 0.3.15wip/nixpkgs-raku
parent
e57571bdb6
commit
aee00346d8
@ -0,0 +1,36 @@ |
||||
{ lib, fetchFromGitLab, rustPlatform }: |
||||
|
||||
rustPlatform.buildRustPackage rec { |
||||
pname = "tezos-rust-libs"; |
||||
version = "1.0"; |
||||
|
||||
src = fetchFromGitLab { |
||||
owner = "tezos"; |
||||
repo = "tezos-rust-libs"; |
||||
rev = "v${version}"; |
||||
sha256 = "1ffkzbvb0ls4wk9205g3xh2c26cmwnl68x43gh6dm9z4xsic94v5"; |
||||
}; |
||||
|
||||
cargoSha256 = "0dgyqfr3dvvdwdi1wvpd7v9j21740jy4zwrwiwknw7csb4bq9wfx"; |
||||
|
||||
preBuild = '' |
||||
mkdir .cargo |
||||
mv cargo-config .cargo/config |
||||
''; |
||||
|
||||
postInstall = '' |
||||
mkdir $out/lib/tezos-rust-libs |
||||
cp -r rustc-bls12-381/include $out/include |
||||
cp $out/lib/librustc_bls12_381.a $out/lib/tezos-rust-libs |
||||
cp $out/lib/librustzcash.a $out/lib/tezos-rust-libs |
||||
''; |
||||
|
||||
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 ]; |
||||
}; |
||||
} |
@ -0,0 +1,38 @@ |
||||
{ lib, fetchFromGitLab, buildDunePackage, ff, zarith, ctypes, tezos-rust-libs, alcotest }: |
||||
|
||||
buildDunePackage rec { |
||||
pname = "bls12-381"; |
||||
version = "0.3.15"; |
||||
|
||||
src = fetchFromGitLab { |
||||
owner = "dannywillems"; |
||||
repo = "ocaml-bls12-381"; |
||||
rev = version; |
||||
sha256 = "1s8n657fsl2gs01p7v2ffpcfzymavifhhpriyx1gq5qh4zvvw4vr"; |
||||
}; |
||||
useDune2 = true; |
||||
|
||||
minimalOCamlVersion = "4.08"; |
||||
propagatedBuildInputs = [ |
||||
ff |
||||
zarith |
||||
ctypes |
||||
tezos-rust-libs |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
alcotest |
||||
]; |
||||
|
||||
# This is a hack to work around the hack used in the dune files |
||||
OPAM_SWITCH_PREFIX = "${tezos-rust-libs}"; |
||||
|
||||
doCheck = true; |
||||
|
||||
meta = { |
||||
homepage = "https://gitlab.com/dannywillems/ocaml-bls12-381"; |
||||
description = "OCaml binding for bls12-381 from librustzcash"; |
||||
license = lib.licenses.mit; |
||||
maintainers = [ lib.maintainers.ulrikstrid ]; |
||||
}; |
||||
} |
@ -0,0 +1,32 @@ |
||||
{ lib, fetchFromGitLab, buildDunePackage, zarith, alcotest }: |
||||
|
||||
buildDunePackage rec { |
||||
pname = "ff"; |
||||
version = "0.4.0"; |
||||
|
||||
src = fetchFromGitLab { |
||||
owner = "dannywillems"; |
||||
repo = "ocaml-ff"; |
||||
rev = version; |
||||
sha256 = "1ik29srzkd0pl48p1si9p1c4f8vmx5rgm02yv2arj3vg0a1nfhdv"; |
||||
}; |
||||
|
||||
useDune2 = true; |
||||
|
||||
propagatedBuildInputs = [ |
||||
zarith |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
alcotest |
||||
]; |
||||
|
||||
doCheck = true; |
||||
|
||||
meta = { |
||||
homepage = "https://gitlab.com/dannywillems/ocaml-ff"; |
||||
description = "OCaml implementation of Finite Field operations"; |
||||
license = lib.licenses.mit; |
||||
maintainers = [ lib.maintainers.ulrikstrid ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue