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.15
This commit is contained in:
parent
e57571bdb6
commit
aee00346d8
36
pkgs/development/libraries/tezos-rust-libs/default.nix
Normal file
36
pkgs/development/libraries/tezos-rust-libs/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
38
pkgs/development/ocaml-modules/bls12-381/default.nix
Normal file
38
pkgs/development/ocaml-modules/bls12-381/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
32
pkgs/development/ocaml-modules/ff/default.nix
Normal file
32
pkgs/development/ocaml-modules/ff/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -1979,6 +1979,8 @@ in
|
|||
|
||||
tensorflow-lite = callPackage ../development/libraries/science/math/tensorflow-lite { };
|
||||
|
||||
tezos-rust-libs = callPackage ../development/libraries/tezos-rust-libs { };
|
||||
|
||||
behdad-fonts = callPackage ../data/fonts/behdad-fonts { };
|
||||
|
||||
bfetch = callPackage ../tools/misc/bfetch { };
|
||||
|
|
|
@ -78,6 +78,8 @@ let
|
|||
|
||||
bitv = callPackage ../development/ocaml-modules/bitv { };
|
||||
|
||||
bls12-381 = callPackage ../development/ocaml-modules/bls12-381 { };
|
||||
|
||||
bolt = callPackage ../development/ocaml-modules/bolt { };
|
||||
|
||||
bos = callPackage ../development/ocaml-modules/bos { };
|
||||
|
@ -371,6 +373,8 @@ let
|
|||
|
||||
fdkaac = callPackage ../development/ocaml-modules/fdkaac { };
|
||||
|
||||
ff = callPackage ../development/ocaml-modules/ff { };
|
||||
|
||||
fiat-p256 = callPackage ../development/ocaml-modules/fiat-p256 { };
|
||||
|
||||
fieldslib_p4 = callPackage ../development/ocaml-modules/fieldslib { };
|
||||
|
|
Loading…
Reference in a new issue