1{stdenv, lib, fetchurl, ocaml, findlib}:
2
3if lib.versionAtLeast ocaml.version "4.06"
4then throw "cryptgps is not available for OCaml ${ocaml.version}"
5else
6
7stdenv.mkDerivation {
8 pname = "ocaml-cryptgps";
9 version = "0.2.1";
10
11 src = fetchurl {
12 url = "http://download.camlcity.org/download/cryptgps-0.2.1.tar.gz";
13 sha256 = "1mp7i42cm9w9grmcsa69m3h1ycpn6a48p43y4xj8rsc12x9nav3s";
14 };
15
16 nativeBuildInputs = [ ocaml findlib ];
17
18 strictDeps = true;
19
20 dontConfigure = true; # Skip configure phase
21
22 createFindlibDestdir = true;
23
24 meta = {
25 homepage = "http://projects.camlcity.org/projects/cryptgps.html";
26 description = "Cryptographic functions for OCaml";
27 longDescription = ''
28 This library implements the symmetric cryptographic algorithms
29 Blowfish, DES, and 3DES. The algorithms are written in O'Caml,
30 i.e. this is not a binding to some C library, but the implementation
31 itself.
32 '';
33 license = lib.licenses.mit;
34 inherit (ocaml.meta) platforms;
35 maintainers = [
36 lib.maintainers.maggesi
37 ];
38 };
39}