git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.chacha: init at 1.0.0
commitdd37bf5d75fd1fbfc7e71d46c9db926909198eef authorMihai Fufezan <fufexan@pm.me> dateFri 27 Aug 2021, 10:33 (5 years ago) parent38927fa
2 files changed+43
pkgs/development/ocaml-modules/chacha/default.nix+41 pkgs/top-level/ocaml-packages.nix+2
pkgs/development/ocaml-modules/chacha/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ lib
2+, buildDunePackage
3+, fetchurl
4+, ocaml
5+
6+, alcotest
7+, cstruct
8+, mirage-crypto
9+}:
10+
11+buildDunePackage rec {
12+ pname = "chacha";
13+ version = "1.0.0";
14+
15+ src = fetchurl {
16+ url = "https://github.com/abeaumont/ocaml-chacha/releases/download/${version}/${pname}-${version}.tbz";
17+ sha256 = "sha256-t8dOMQQDpje0QbuOhjSIa3xnXuXcxMVTLENa/rwdgA4=";
18+ };
19+
20+ useDune2 = true;
21+
22+ minimumOCamlVersion = "4.02";
23+
24+ propagatedBuildInputs = [ cstruct mirage-crypto ];
25+
26+ # alcotest isn't available for OCaml < 4.05 due to fmt
27+ doCheck = lib.versionAtLeast ocaml.version "4.05";
28+ checkInputs = [ alcotest ];
29+
30+ meta = {
31+ homepage = "https://github.com/abeaumont/ocaml-chacha";
32+ description = "ChaCha20, ChaCha12 and ChaCha8 encryption functions, in OCaml";
33+ longDescription = ''
34+ An OCaml implementation of ChaCha functions, both ChaCha20 and the reduced
35+ ChaCha8 and ChaCha12 functions. The hot loop is implemented in C for efficiency
36+ reasons.
37+ '';
38+ license = lib.licenses.bsd2;
39+ maintainers = with lib.maintainers; [ fufexan ];
40+ };
41+}
pkgs/top-level/ocaml-packages.nix+2
@@ -161,6 +161,8 @@ let
161161
162162 cfstream = callPackage ../development/ocaml-modules/cfstream { };
163163
164+ chacha = callPackage ../development/ocaml-modules/chacha { };
165+
164166 charInfo_width = callPackage ../development/ocaml-modules/charInfo_width { };
165167
166168 checkseum = callPackage ../development/ocaml-modules/checkseum { };