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/ctypes/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/ocaml-gettext/default.nix38
-rw-r--r--pkgs/development/ocaml-modules/ocaml-gettext/stub.nix14
-rw-r--r--pkgs/development/ocaml-modules/sedlex/default.nix6
4 files changed, 34 insertions, 30 deletions
diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix
index bc76cfcd64cf0..8a16dcec343bf 100644
--- a/pkgs/development/ocaml-modules/ctypes/default.nix
+++ b/pkgs/development/ocaml-modules/ctypes/default.nix
@@ -6,11 +6,11 @@ else
 
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-ctypes-${version}";
-  version = "0.15.1";
+  version = "0.17.1";
 
   src = fetchzip {
     url = "https://github.com/ocamllabs/ocaml-ctypes/archive/${version}.tar.gz";
-    sha256 = "0adas974bwinn8jidb6chljkpd70s041h2a969dicsj0xsg6wys6";
+    sha256 = "16brmdnz7wi2z25qqhd5s5blyq4app6jbv6g9pa4vyg6h0nzbcys";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    homepage = https://github.com/ocamllabs/ocaml-ctypes;
+    homepage = "https://github.com/ocamllabs/ocaml-ctypes";
     description = "Library for binding to C libraries using pure OCaml";
     license = licenses.mit;
     maintainers = [ maintainers.ericbmerritt ];
diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/default.nix b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
index 014525ef2b4e4..547fa77ae6e9a 100644
--- a/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
@@ -1,38 +1,28 @@
-{ stdenv, fetchurl, ocaml, findlib, camlp4, ounit, gettext, fileutils, camomile }:
+{ lib, fetchurl, buildDunePackage, gettext, fileutils, ounit }:
 
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-gettext-${version}";
-  version = "0.3.8";
+buildDunePackage rec {
+  pname = "gettext";
+  version = "0.4.1";
+
+  minimumOCamlVersion = "4.03";
 
   src = fetchurl {
-    url = "https://forge.ocamlcore.org/frs/download.php/1731/ocaml-gettext-${version}.tar.gz";
-    sha256 = "05wnpxwzzpn2qinah2wb5wzfh5iz8gyf8jyihdbjxc8mk4hf70qv";
+    url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${version}/gettext-v${version}.tbz";
+    sha256 = "0pwy6ym5fd77mdbgyas8x86vbrri9cgk79g8wxdjplhyi7zhh158";
   };
 
-  propagatedBuildInputs = [ gettext fileutils camomile ];
-
-  buildInputs = [ ocaml findlib camlp4 ounit ];
-
-  postPatch = stdenv.lib.optionalString (camlp4 != null) ''
-    substituteInPlace test/test.ml                  --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
-    substituteInPlace ocaml-gettext/OCamlGettext.ml --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
-    substituteInPlace ocaml-gettext/Makefile        --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
-    substituteInPlace ocaml-gettext/Makefile        --replace "unix.cma" ""
-    substituteInPlace libgettext-ocaml/Makefile     --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
-    substituteInPlace libgettext-ocaml/Makefile     --replace "\$(shell ocamlc -where)" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib"
-  '';
+  propagatedBuildInputs = [ gettext fileutils ];
 
-  configureFlags = [ "--disable-doc" ];
+  doCheck = true;
 
-  createFindlibDestdir = true;
+  checkInputs = lib.optional doCheck ounit;
 
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "OCaml Bindings to gettext";
-    homepage = https://forge.ocamlcore.org/projects/ocaml-gettext;
-    license = licenses.gpl2;
+    homepage = "https://github.com/gildor478/ocaml-gettext";
+    license = licenses.lgpl21;
     maintainers = [ maintainers.volth ];
-    platforms = ocaml.meta.platforms or [];
   };
 }
diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix
new file mode 100644
index 0000000000000..b18c0abc530bf
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix
@@ -0,0 +1,14 @@
+{ lib, buildDunePackage, ocaml_gettext, ounit }:
+
+buildDunePackage rec {
+
+  pname = "gettext-stub";
+
+  inherit (ocaml_gettext) src version meta;
+
+  propagatedBuildInputs = [ ocaml_gettext ];
+
+  doCheck = true;
+
+  checkInputs = lib.optional doCheck ounit;
+}
diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix
index 653f453258571..e9b3721bc6827 100644
--- a/pkgs/development/ocaml-modules/sedlex/default.nix
+++ b/pkgs/development/ocaml-modules/sedlex/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib, gen, ppx_tools_versioned }:
+{ stdenv, fetchzip, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4.02"
 then throw "sedlex is not available for OCaml ${ocaml.version}"
@@ -13,9 +13,9 @@ stdenv.mkDerivation rec {
     sha256 = "0phnqyn6mpv5byr1kkphl24y9q9fb2k3xg9yb457h5816q6ya72n";
   };
 
-  buildInputs = [ ocaml findlib ppx_tools_versioned ];
+  buildInputs = [ ocaml findlib ];
 
-  propagatedBuildInputs = [ gen ];
+  propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ];
 
   buildFlags = [ "all" "opt" ];