2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildDunePackage
|
|
|
|
, fetchFromGitLab
|
|
|
|
, zarith
|
2023-03-30 22:05:00 +00:00
|
|
|
, zarith_stubs_js ? null
|
|
|
|
, integers_stubs_js
|
2023-07-15 17:15:38 +00:00
|
|
|
, integers
|
|
|
|
, hex
|
|
|
|
, alcotest
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "bls12-381";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "6.1.0";
|
2022-01-25 03:21:06 +00:00
|
|
|
src = fetchFromGitLab {
|
2023-07-15 17:15:38 +00:00
|
|
|
owner = "nomadic-labs";
|
|
|
|
repo = "cryptography/ocaml-bls12-381";
|
2022-10-21 18:38:19 +00:00
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-z2ZSOrXgm+XjdrY91vqxXSKhA0DyJz6JkkNljDZznX8=";
|
2022-01-25 03:21:06 +00:00
|
|
|
};
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./src/*.sh
|
|
|
|
'';
|
2022-01-25 03:21:06 +00:00
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
zarith
|
2022-10-21 18:38:19 +00:00
|
|
|
zarith_stubs_js
|
|
|
|
integers_stubs_js
|
|
|
|
hex
|
2023-07-15 17:15:38 +00:00
|
|
|
integers
|
2021-07-16 19:40:57 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
doCheck = true;
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
meta = {
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = " https://nomadic-labs.gitlab.io/cryptography/ocaml-bls12-381/bls12-381/";
|
|
|
|
description = "Implementation of BLS12-381 and some cryptographic primitives built on top of it";
|
2021-07-16 19:40:57 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.ulrikstrid ];
|
|
|
|
};
|
|
|
|
}
|