about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ocaml-gettext
diff options
context:
space:
mode:
authorvolth <volth@webmaster.ms>2017-02-04 15:07:45 +0000
committerJoachim F <joachifm@users.noreply.github.com>2017-02-04 16:07:45 +0100
commit762cc106b489a0eba55a72a8fdd17d24054132d9 (patch)
tree07f23014cf6761e75b8f364088b1743c18ebab50 /pkgs/development/ocaml-modules/ocaml-gettext
parent913c5b21d5754c78cdf1a376da876ee3bff1de8b (diff)
downloadnixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.tar
nixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.tar.gz
nixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.tar.bz2
nixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.tar.lz
nixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.tar.xz
nixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.tar.zst
nixlib-762cc106b489a0eba55a72a8fdd17d24054132d9.zip
virt-top: init at 1.0.8 (#21536)
Diffstat (limited to 'pkgs/development/ocaml-modules/ocaml-gettext')
-rw-r--r--pkgs/development/ocaml-modules/ocaml-gettext/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/default.nix b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
new file mode 100644
index 000000000000..d8a874a7e2f5
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, ocaml, findlib, camlp4, ounit, gettext, fileutils, camomile }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml-gettext-${version}";
+  version = "0.3.5";
+
+  src = fetchurl {
+    url = "https://forge.ocamlcore.org/frs/download.php/1433/ocaml-gettext-${version}.tar.gz";
+    sha256 = "0s625h7y9xxqvzk4bnw45k4wvl4fn8gblv56bp47il0lgsx8956i";
+  };
+
+  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"
+  '';
+
+  configureFlags = [ "--disable-doc" ];
+
+  createFindlibDestdir = true;
+
+  meta = with stdenv.lib; {
+    description = "OCaml Bindings to gettext";
+    homepage = https://forge.ocamlcore.org/projects/ocaml-gettext;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.volth ];
+    platforms = ocaml.meta.platforms or [];
+  };
+}