2022-09-13 12:14:19 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, ounit2, cstruct, dune-configurator, eqaf, pkg-config
|
2021-03-30 12:56:02 +00:00
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
|
|
|
}:
|
2020-04-13 11:20:48 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
2022-09-13 12:14:19 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
2023-03-09 17:19:14 +00:00
|
|
|
duneVersion = "3";
|
2020-04-13 11:20:48 +00:00
|
|
|
|
|
|
|
pname = "mirage-crypto";
|
2023-10-11 22:54:04 +00:00
|
|
|
version = "0.11.2";
|
2020-04-13 11:20:48 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-09-13 12:14:19 +00:00
|
|
|
url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz";
|
2023-10-11 22:54:04 +00:00
|
|
|
sha256 = "sha256-1rl8t/DcNEpgJRPMAxN8Hn8K4QXQchYUYmz08jHt92Q=";
|
2020-04-13 11:20:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = true;
|
2022-03-01 15:42:22 +00:00
|
|
|
checkInputs = [ ounit2 ];
|
2020-04-13 11:20:48 +00:00
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ dune-configurator ];
|
2021-03-30 12:56:02 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-10 12:00:39 +00:00
|
|
|
cstruct eqaf
|
2021-03-30 12:56:02 +00:00
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
2020-04-13 11:20:48 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/mirage/mirage-crypto";
|
|
|
|
description = "Simple symmetric cryptography for the modern age";
|
2021-03-30 12:56:02 +00:00
|
|
|
license = [
|
|
|
|
licenses.isc # default license
|
|
|
|
licenses.bsd2 # mirage-crypto-rng-mirage
|
|
|
|
licenses.mit # mirage-crypto-ec
|
|
|
|
];
|
2020-04-13 11:20:48 +00:00
|
|
|
maintainers = with maintainers; [ sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|