2021-12-10 12:00:39 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, eqaf, pkg-config
|
2021-03-30 13:56:02 +01:00
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
|
|
|
}:
|
2020-04-13 12:20:48 +01:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
2020-05-20 23:57:24 +01:00
|
|
|
minimumOCamlVersion = "4.08";
|
2020-04-13 12:20:48 +01:00
|
|
|
|
|
|
|
pname = "mirage-crypto";
|
2021-12-10 12:00:39 +00:00
|
|
|
version = "0.10.5";
|
2020-04-13 12:20:48 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz";
|
2021-12-10 12:00:39 +00:00
|
|
|
sha256 = "sha256-eeKMSRZrBiTzWLv80P5LeouPib24uTigk2HLtORKpJU=";
|
2020-04-13 12:20:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
useDune2 = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [ ounit ];
|
|
|
|
|
2020-05-20 23:57:24 +01:00
|
|
|
nativeBuildInputs = [ dune-configurator pkg-config ];
|
2021-03-30 13:56:02 +01:00
|
|
|
propagatedBuildInputs = [
|
2021-12-10 12:00:39 +00:00
|
|
|
cstruct eqaf
|
2021-03-30 13:56:02 +01:00
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
2020-04-13 12:20:48 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/mirage/mirage-crypto";
|
|
|
|
description = "Simple symmetric cryptography for the modern age";
|
2021-03-30 13:56:02 +01:00
|
|
|
license = [
|
|
|
|
licenses.isc # default license
|
|
|
|
licenses.bsd2 # mirage-crypto-rng-mirage
|
|
|
|
licenses.mit # mirage-crypto-ec
|
|
|
|
];
|
2020-04-13 12:20:48 +01:00
|
|
|
maintainers = with maintainers; [ sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|