2024-07-01 15:47:52 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, ounit2, dune-configurator, eqaf-cstruct, pkg-config
|
2021-04-05 15:23:46 +00:00
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
2022-09-22 12:36:57 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
pname = "mirage-crypto";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.11.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-09-22 12:36:57 +00:00
|
|
|
url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-v7Uw+hac2QXrx+JEnzQHz71nAjrAspG4tvShQ3pdlbE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = true;
|
2023-02-09 11:40:11 +00:00
|
|
|
checkInputs = [ ounit2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ dune-configurator ];
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-07-01 15:47:52 +00:00
|
|
|
eqaf-cstruct
|
2021-04-05 15:23:46 +00:00
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
# Compatibility with eqaf 0.10
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/dune --replace-warn eqaf.cstruct eqaf-cstruct
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/mirage/mirage-crypto";
|
|
|
|
description = "Simple symmetric cryptography for the modern age";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = [
|
|
|
|
licenses.isc # default license
|
|
|
|
licenses.bsd2 # mirage-crypto-rng-mirage
|
|
|
|
licenses.mit # mirage-crypto-ec
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|