12 buildDunePackage rec {
16 src = fetchFromGitHub {
18 repo = "ocaml-chacha";
20 sha256 = "sha256-PmeiFloU0k3SqOK1VjaliiCEzDzrzyMSasgnO5fJS1k=";
23 # Ensure compatibility with cstruct ≥ 6.1.0
24 patches = [ (fetchpatch {
25 url = "https://github.com/abeaumont/ocaml-chacha/commit/fbe4a0a808226229728a68f278adf370251196fd.patch";
26 sha256 = "sha256-y7X9toFDrgdv3qmFmUs7K7QS+Gy45rRLulKy48m7uqc=";
29 minimalOCamlVersion = "4.02";
31 propagatedBuildInputs = [ cstruct mirage-crypto ];
33 # alcotest isn't available for OCaml < 4.05 due to fmt
34 doCheck = lib.versionAtLeast ocaml.version "4.05";
35 checkInputs = [ alcotest ];
38 homepage = "https://github.com/abeaumont/ocaml-chacha";
39 description = "ChaCha20, ChaCha12 and ChaCha8 encryption functions, in OCaml";
41 An OCaml implementation of ChaCha functions, both ChaCha20 and the reduced
42 ChaCha8 and ChaCha12 functions. The hot loop is implemented in C for efficiency
45 license = lib.licenses.bsd2;
46 maintainers = with lib.maintainers; [ fufexan ];