2021-03-30 14:56:02 +02:00
|
|
|
{ lib
|
2022-02-22 10:59:04 +01:00
|
|
|
, ocaml
|
2021-03-30 14:56:02 +02:00
|
|
|
, buildDunePackage
|
|
|
|
, mirage-crypto
|
|
|
|
, dune-configurator
|
|
|
|
, pkg-config
|
|
|
|
, cstruct
|
|
|
|
, mirage-crypto-rng
|
|
|
|
, mirage-crypto-pk
|
|
|
|
, hex
|
|
|
|
, alcotest
|
|
|
|
, asn1-combinators
|
|
|
|
, ppx_deriving_yojson
|
|
|
|
, ppx_deriving
|
|
|
|
, yojson
|
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
|
|
|
}:
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
buildDunePackage rec {
|
2021-03-30 14:56:02 +02:00
|
|
|
pname = "mirage-crypto-ec";
|
|
|
|
|
|
|
|
inherit (mirage-crypto)
|
|
|
|
minimumOCamlVersion
|
|
|
|
src
|
|
|
|
version
|
2022-02-22 10:59:04 +01:00
|
|
|
useDune2;
|
2021-03-30 14:56:02 +02:00
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
|
|
ocaml
|
2021-03-30 14:56:02 +02:00
|
|
|
dune-configurator
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cstruct
|
|
|
|
mirage-crypto
|
|
|
|
mirage-crypto-rng
|
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
strictDeps = !doCheck;
|
|
|
|
|
2021-03-30 14:56:02 +02:00
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [
|
|
|
|
hex
|
|
|
|
alcotest
|
|
|
|
asn1-combinators
|
|
|
|
ppx_deriving_yojson
|
|
|
|
ppx_deriving
|
|
|
|
yojson
|
|
|
|
mirage-crypto-pk
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = mirage-crypto.meta // {
|
|
|
|
description = "Elliptic Curve Cryptography with primitives taken from Fiat";
|
|
|
|
};
|
|
|
|
}
|