about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/caqti/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/fiber/default.nix27
-rw-r--r--pkgs/development/ocaml-modules/gluten/default.nix7
-rw-r--r--pkgs/development/ocaml-modules/gluten/eio.nix12
-rw-r--r--pkgs/development/ocaml-modules/gluten/lwt-unix.nix2
-rw-r--r--pkgs/development/ocaml-modules/gluten/lwt.nix2
-rw-r--r--pkgs/development/ocaml-modules/readline/default.nix34
-rw-r--r--pkgs/development/ocaml-modules/readline/dune.patch16
-rw-r--r--pkgs/development/ocaml-modules/tls/default.nix4
10 files changed, 89 insertions, 39 deletions
diff --git a/pkgs/development/ocaml-modules/caqti/default.nix b/pkgs/development/ocaml-modules/caqti/default.nix
index 2d62ba7e0c6e3..68eb2657b324d 100644
--- a/pkgs/development/ocaml-modules/caqti/default.nix
+++ b/pkgs/development/ocaml-modules/caqti/default.nix
@@ -23,7 +23,7 @@ buildDunePackage rec {
 
   meta = {
     description = "Unified interface to relational database libraries";
-    license = "LGPL-3.0-or-later WITH OCaml-LGPL-linking-exception";
+    license = with lib.licenses; [ lgpl3Plus ocamlLgplLinkingException ];
     maintainers = with lib.maintainers; [ bcc32 ];
     homepage = "https://github.com/paurkedal/ocaml-caqti";
   };
diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix
index 5be5f09d19655..fac5789dcdd1a 100644
--- a/pkgs/development/ocaml-modules/eliom/default.nix
+++ b/pkgs/development/ocaml-modules/eliom/default.nix
@@ -1,15 +1,11 @@
-{ stdenv
+{ buildDunePackage
 , lib
 , fetchFromGitHub
 , which
 , ocsigen_server
-, ocaml
 , lwt_react
-, opaline
-, ocamlbuild
 , ppx_deriving
 , ppx_optcomp
-, findlib
 , js_of_ocaml-ocamlbuild
 , js_of_ocaml-ppx
 , js_of_ocaml-ppx_deriving_json
@@ -20,23 +16,19 @@
 , ocsipersist
 }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
   pname = "eliom";
-  version = "10.1.0";
+  version = "10.1.2";
 
   src = fetchFromGitHub {
     owner = "ocsigen";
     repo = "eliom";
     rev = version;
-    hash = "sha256-nzrLl8adaRW6c+IQfJ7s+7KtFT8uU27Umyrv0aWXuxw=";
+    hash = "sha256-Cxwp534ADUO7AHnxZnGsrqxGDkhcJ314M5wytO4e8/0=";
   };
 
   nativeBuildInputs = [
-    ocaml
     which
-    findlib
-    opaline
-    ocamlbuild
   ];
   buildInputs = [
     js_of_ocaml-ocamlbuild
@@ -58,12 +50,6 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  installPhase = ''
-    runHook preInstall
-    opaline -prefix $out -libdir $OCAMLFIND_DESTDIR
-    runHook postInstall
-  '';
-
   setupHook = [ ./setup-hook.sh ];
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/fiber/default.nix b/pkgs/development/ocaml-modules/fiber/default.nix
index da5e4580e168f..69bd4a067e274 100644
--- a/pkgs/development/ocaml-modules/fiber/default.nix
+++ b/pkgs/development/ocaml-modules/fiber/default.nix
@@ -1,20 +1,29 @@
-{ lib, buildDunePackage, fetchFromGitHub, stdune, dyn }:
+{ lib
+, buildDunePackage
+, dyn
+, fetchurl
+, ocaml
+, ppx_expect
+, stdune
+}:
 
 buildDunePackage rec {
   pname = "fiber";
-  version = "unstable-2023-02-28";
+  version = "3.7.0";
 
-  src = fetchFromGitHub {
-    owner = "ocaml-dune";
-    repo = "fiber";
-    rev = "5563b588c1313f128eafa74d66f0626c9128d34d";
-    hash = "sha256-18GfGXpu+uiIiCuLhIx5z5jRkem1nNWaQB6Ms0AE9sE=";
+  src = fetchurl {
+    url = "https://github.com/ocaml-dune/fiber/releases/download/${version}/fiber-lwt-${version}.tbz";
+    hash = "sha256-hkihWuk/5pQpmc42iHQpo5E7YoKcRxTlIMwOehw7loI=";
   };
 
-  duneVersion = "3";
-
   buildInputs = [ stdune dyn ];
 
+  checkInputs = [ ppx_expect ];
+
+  # Tests are Ocaml version dependent
+  # https://github.com/ocaml-dune/fiber/issues/27
+  doCheck = false;
+
   meta = with lib; {
     description = "Structured concurrency library";
     homepage = "https://github.com/ocaml-dune/fiber";
diff --git a/pkgs/development/ocaml-modules/gluten/default.nix b/pkgs/development/ocaml-modules/gluten/default.nix
index d0f41d2026898..5c55f2f09bfd1 100644
--- a/pkgs/development/ocaml-modules/gluten/default.nix
+++ b/pkgs/development/ocaml-modules/gluten/default.nix
@@ -3,25 +3,22 @@
 , faraday
 , fetchurl
 , lib
-, ke
 }:
 
 buildDunePackage rec {
   pname = "gluten";
-  version = "0.3.0";
+  version = "0.5.0";
 
   src = fetchurl {
     url = "https://github.com/anmonteiro/gluten/releases/download/${version}/gluten-${version}.tbz";
-    hash = "sha256-9jctX3G/nQJTGJ7ClSBEiXwxeu0GcT9N+EmPfLuSFOU=";
+    hash = "sha256-mGKbbQSPMOumUCtxrAdoBt5y2RrkAf58spkUymTYhYM=";
   };
 
   minimalOCamlVersion = "4.08";
-  duneVersion = "3";
 
   propagatedBuildInputs = [
     bigstringaf
     faraday
-    ke
   ];
 
   doCheck = false; # No tests
diff --git a/pkgs/development/ocaml-modules/gluten/eio.nix b/pkgs/development/ocaml-modules/gluten/eio.nix
new file mode 100644
index 0000000000000..9c78b1d73cd4c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/gluten/eio.nix
@@ -0,0 +1,12 @@
+{ lib, buildDunePackage, gluten, eio }:
+
+buildDunePackage {
+  pname = "gluten-eio";
+  inherit (gluten) src version;
+
+  propagatedBuildInputs = [ gluten eio ];
+
+  meta = gluten.meta // {
+    description = "EIO runtime for gluten";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/gluten/lwt-unix.nix b/pkgs/development/ocaml-modules/gluten/lwt-unix.nix
index cec427c3ad618..c3a360322a14a 100644
--- a/pkgs/development/ocaml-modules/gluten/lwt-unix.nix
+++ b/pkgs/development/ocaml-modules/gluten/lwt-unix.nix
@@ -9,8 +9,6 @@ buildDunePackage rec {
   pname = "gluten-lwt-unix";
   inherit (gluten) doCheck meta src version;
 
-  duneVersion = "3";
-
   propagatedBuildInputs = [
     faraday-lwt-unix
     gluten-lwt
diff --git a/pkgs/development/ocaml-modules/gluten/lwt.nix b/pkgs/development/ocaml-modules/gluten/lwt.nix
index cfa736c4bc99d..e4cfb0d8db02a 100644
--- a/pkgs/development/ocaml-modules/gluten/lwt.nix
+++ b/pkgs/development/ocaml-modules/gluten/lwt.nix
@@ -7,8 +7,6 @@ buildDunePackage rec {
   pname = "gluten-lwt";
   inherit (gluten) doCheck meta src version;
 
-  duneVersion = "3";
-
   propagatedBuildInputs = [
     gluten
     lwt
diff --git a/pkgs/development/ocaml-modules/readline/default.nix b/pkgs/development/ocaml-modules/readline/default.nix
new file mode 100644
index 0000000000000..43763a3116c6f
--- /dev/null
+++ b/pkgs/development/ocaml-modules/readline/default.nix
@@ -0,0 +1,34 @@
+{ lib, buildDunePackage, fetchFromGitLab
+, readline
+}:
+
+buildDunePackage {
+  pname = "readline";
+  version = "0.1";
+
+  minimalOCamlVersion = "4.14";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "vtourneu";
+    repo = "readline-ocaml";
+    rev = "b3f84c8a006439142884d3e0df51b395d963f9fe";
+    hash = "sha256-h4kGbzwM88rPGj/KkHKgGyfyvkAYHP83ZY1INZzTaIE=";
+  };
+
+  patches = [ ./dune.patch ];
+
+  preConfigure = ''
+    echo "(${lib.getOutput "dev" readline}/include)" > src/iflags.sexp
+    echo "(-L${lib.getOutput "lib" readline}/lib -lreadline)" > src/lflags.sexp
+  '';
+
+  propagatedBuildInputs = [ readline ];
+
+  meta = {
+    description = "OCaml bindings for GNU Readline";
+    homepage = "https://vtourneu.gitlabpages.inria.fr/readline-ocaml/readline/index.html";
+    license = lib.licenses.cecill20;
+    maintainers = [ lib.maintainers.vbgl ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/readline/dune.patch b/pkgs/development/ocaml-modules/readline/dune.patch
new file mode 100644
index 0000000000000..9b62fb6f9b518
--- /dev/null
+++ b/pkgs/development/ocaml-modules/readline/dune.patch
@@ -0,0 +1,16 @@
+--- a/src/dune	2023-11-23 16:07:10.195742159 +0100
++++ b/src/dune	2023-11-23 16:07:22.055805922 +0100
+@@ -1,13 +1,3 @@
+-(rule
+-  (target iflags.sexp)
+-  (action (run ./discover.sh include))
+-)
+-
+-(rule
+-  (target lflags.sexp)
+-  (action (run ./discover.sh lib))
+-)
+-
+ (library
+   (name readline)
+   (public_name readline)
diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix
index e89ac5aeeef5a..032b080bebd7b 100644
--- a/pkgs/development/ocaml-modules/tls/default.nix
+++ b/pkgs/development/ocaml-modules/tls/default.nix
@@ -6,11 +6,11 @@
 
 buildDunePackage rec {
   pname = "tls";
-  version = "0.17.1";
+  version = "0.17.3";
 
   src = fetchurl {
     url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-${version}.tbz";
-    hash = "sha256-gBDStt4UjaIoaSgYHSM71yD6YPoVez1CULyg3QCMXT8=";
+    hash = "sha256-R+XezdMO0cNnc2RYpjrgd0dBR7PdZ1wUWQuBqS1QMdQ=";
   };
 
   minimalOCamlVersion = "4.08";