about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2016-11-03 01:23:53 +0100
committersternenseemann <git@lukasepple.de>2016-11-18 14:23:49 +0100
commitd98a770ec41ef4da5fc935ffcaabb60e5c8c8a98 (patch)
tree3aa9378bff7f7ef4115ae661cca43ca34e36696d
parentd1b4358453cf76900cc5b51c0221abdee0eb356e (diff)
downloadnixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.tar
nixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.tar.gz
nixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.tar.bz2
nixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.tar.lz
nixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.tar.xz
nixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.tar.zst
nixlib-d98a770ec41ef4da5fc935ffcaabb60e5c8c8a98.zip
ocaml-tls: init at 0.7.1
-rw-r--r--pkgs/development/ocaml-modules/tls/default.nix41
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix
new file mode 100644
index 000000000000..b38138c55731
--- /dev/null
+++ b/pkgs/development/ocaml-modules/tls/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, buildOcaml, fetchFromGitHub, findlib, ocamlbuild, ocaml_oasis
+, ppx_tools, ppx_sexp_conv, result, x509, nocrypto, cstruct, ounit
+, lwt     ? null}:
+
+with stdenv.lib;
+
+let withLwt = lwt != null; in
+
+buildOcaml rec {
+  version = "0.7.1";
+  name = "tls";
+
+  minimunSupportedOcamlVersion = "4.02";
+
+  src = fetchFromGitHub {
+    owner  = "mirleft";
+    repo   = "ocaml-tls";
+    rev    = "${version}";
+    sha256 = "19q2hzxiasz9pzczgb63kikg0mc9mw98dfvch5falf2rincycj24";
+  };
+
+  buildInputs = [ ocamlbuild findlib ocaml_oasis ppx_sexp_conv ounit ];
+  propagatedBuildInputs = [ cstruct nocrypto result x509 ] ++
+                          optional withLwt lwt;
+
+  configureFlags = [ "--disable-mirage" "--enable-tests" ] ++
+                   optional withLwt ["--enable-lwt"];
+
+  configurePhase = "./configure --prefix $out $configureFlags";
+
+  doCheck = true;
+  checkTarget = "test";
+  createFindlibDestdir = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/mirleft/ocaml-tls;
+    description = "TLS in pure OCaml";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ sternenseemann ];
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index c7422bdaba4a..4b6c678fd808 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -366,6 +366,10 @@ let
 
     textutils_p4 = callPackage ../development/ocaml-modules/textutils { };
 
+    tls = callPackage ../development/ocaml-modules/tls {
+      lwt = ocaml_lwt;
+    };
+
     type_conv_108_08_00 = callPackage ../development/ocaml-modules/type_conv/108.08.00.nix { };
     type_conv_109_60_01 = callPackage ../development/ocaml-modules/type_conv/109.60.01.nix { };
     type_conv_112_01_01 = callPackage ../development/ocaml-modules/type_conv/112.01.01.nix { };