@@ -0,0 +1,33 @@
1+{ stdenv, fetchzip, ocaml, findlib, cstruct, type_conv, zarith, ounit }:
2+
3+let
4+ version = "0.5.1";
5+ ocaml_version = stdenv.lib.getVersion ocaml;
6+in
7+
8+assert stdenv.lib.versionAtLeast ocaml_version "4.01";
9+
10+stdenv.mkDerivation {
11+ name = "ocaml-nocrypto-${version}";
12+
13+ src = fetchzip {
14+ url = "https://github.com/mirleft/ocaml-nocrypto/archive/${version}.tar.gz";
15+ sha256 = "15gffvixk12ghsfra9amfszd473c8h188zfj03ngvblbdm0d80m0";
16+ };
17+
18+ buildInputs = [ ocaml findlib type_conv ounit ];
19+ propagatedBuildInputs = [ cstruct zarith ];
20+
21+ configureFlags = "--enable-tests";
22+ doCheck = true;
23+ checkTarget = "test";
24+ createFindlibDestdir = true;
25+
26+ meta = {
27+ homepage = https://github.com/mirleft/ocaml-nocrypto;
28+ description = "Simplest possible crypto to support TLS";
29+ platforms = ocaml.meta.platforms;
30+ license = stdenv.lib.licenses.bsd2;
31+ maintainers = with stdenv.lib.maintainers; [ vbgl ];
32+ };
33+}