about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2020-04-06 21:52:01 +0000
committerGitHub <noreply@github.com>2020-04-06 21:52:01 +0000
commit5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28 (patch)
tree4ce9a611b4c2906593e2d32a39f236779a789cf9 /pkgs
parent32e7c0f16fa99100d13ab8ba202d965e2560b3ff (diff)
parentc0086a5c2ae6257952c165d547237e5affa3fbbc (diff)
downloadnixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.tar
nixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.tar.gz
nixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.tar.bz2
nixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.tar.lz
nixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.tar.xz
nixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.tar.zst
nixlib-5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28.zip
Merge pull request #84457 from vbgl/ocaml-gettext-0.4.1
ocamlPackages.ocaml_gettext: 0.3.8 → 0.4.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/virtualization/virt-top/default.nix2
-rw-r--r--pkgs/development/libraries/libguestfs/default.nix2
-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/top-level/ocaml-packages.nix2
5 files changed, 32 insertions, 26 deletions
diff --git a/pkgs/applications/virtualization/virt-top/default.nix b/pkgs/applications/virtualization/virt-top/default.nix
index f32a2a6ce1c0..efe985920a88 100644
--- a/pkgs/applications/virtualization/virt-top/default.nix
+++ b/pkgs/applications/virtualization/virt-top/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ autoreconfHook ];
-  buildInputs = with ocamlPackages; [ ocaml findlib ocaml_extlib ocaml_libvirt ocaml_gettext curses csv xml-light ];
+  buildInputs = with ocamlPackages; [ ocaml findlib ocaml_extlib ocaml_libvirt gettext-stub curses csv xml-light ];
 
   buildPhase = "make opt";
 
diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix
index 8d480c2d8829..411ae0a33160 100644
--- a/pkgs/development/libraries/libguestfs/default.nix
+++ b/pkgs/development/libraries/libguestfs/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
     systemd fuse yajl libvirt gmp readline file hivex
     numactl xen libapparmor getopt perlPackages.ModuleBuild
   ] ++ (with perlPackages; [ perl libintl_perl GetoptLong SysVirt ])
-    ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ])
+    ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt gettext-stub ounit ])
     ++ stdenv.lib.optional javaSupport jdk;
 
   prePatch = ''
diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/default.nix b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
index 014525ef2b4e..547fa77ae6e9 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 000000000000..b18c0abc530b
--- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 1f768d7cbc5e..fd863e428aff 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -587,6 +587,8 @@ let
 
     ocaml_gettext = callPackage ../development/ocaml-modules/ocaml-gettext { };
 
+    gettext-stub = callPackage ../development/ocaml-modules/ocaml-gettext/stub.nix { };
+
     ocamlgraph = callPackage ../development/ocaml-modules/ocamlgraph { };
 
     ocaml_http = callPackage ../development/ocaml-modules/http { };