1{
2 lib,
3 buildDunePackage,
4 fetchFromGitHub,
5 zlib,
6 dune-configurator,
7 zarith,
8}:
9
10buildDunePackage rec {
11 pname = "cryptokit";
12 version = "1.20.1";
13
14 minimalOCamlVersion = "4.08";
15
16 src = fetchFromGitHub {
17 owner = "xavierleroy";
18 repo = "cryptokit";
19 rev = "release${lib.replaceStrings [ "." ] [ "" ] version}";
20 hash = "sha256-VFY10jGctQfIUVv7dK06KP8zLZHLXTxvLyTCObS+W+E=";
21 };
22
23 # dont do autotools configuration, but do trigger findlib's preConfigure hook
24 configurePhase = ''
25 runHook preConfigure
26 runHook postConfigure
27 '';
28
29 buildInputs = [ dune-configurator ];
30 propagatedBuildInputs = [
31 zarith
32 zlib
33 ];
34
35 doCheck = true;
36
37 meta = {
38 homepage = "http://pauillac.inria.fr/~xleroy/software.html";
39 description = "Library of cryptographic primitives for OCaml";
40 license = lib.licenses.lgpl2Only;
41 maintainers = [
42 lib.maintainers.maggesi
43 ];
44 };
45}