1{
2 lib,
3 fetchurl,
4 buildDunePackage,
5 ohex,
6 ounit2,
7 dune-configurator,
8 eqaf,
9 withFreestanding ? false,
10 ocaml-freestanding,
11}:
12
13buildDunePackage rec {
14 minimalOCamlVersion = "4.13";
15
16 pname = "mirage-crypto";
17 version = "2.0.1";
18
19 src = fetchurl {
20 url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz";
21 hash = "sha256-VDDOPD5AYn0tZ6jez1ZaH2EtOb2zP5t2fDvbYB/1oZY=";
22 };
23
24 doCheck = true;
25 checkInputs = [
26 ohex
27 ounit2
28 ];
29
30 buildInputs = [ dune-configurator ];
31 propagatedBuildInputs = [
32 eqaf
33 ]
34 ++ lib.optionals withFreestanding [
35 ocaml-freestanding
36 ];
37
38 meta = {
39 homepage = "https://github.com/mirage/mirage-crypto";
40 description = "Simple symmetric cryptography for the modern age";
41 changelog = "https://raw.githubusercontent.com/mirage/mirage-crypto/refs/tags/v${version}/CHANGES.md";
42 license = with lib.licenses; [
43 isc # default license
44 bsd2 # mirage-crypto-rng-mirage
45 mit # mirage-crypto-ec
46 ];
47 maintainers = with lib.maintainers; [
48 sternenseemann
49 momeemt
50 ];
51 };
52}