ocamlPackages.ocaml_gettext: 0.3.8 → 0.4.1

This commit is contained in:
Vincent Laporte 2020-04-06 13:44:48 +02:00
parent 5af0a6c7f4
commit c0086a5c2a
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
5 changed files with 32 additions and 26 deletions

View File

@ -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";

View File

@ -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 = ''

View File

@ -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 ];
propagatedBuildInputs = [ gettext fileutils ];
buildInputs = [ ocaml findlib camlp4 ounit ];
doCheck = true;
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;
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 [];
};
}

View File

@ -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;
}

View File

@ -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 { };