ocamlPackages.gettext: 0.4.2 → 0.5.0

This commit is contained in:
Vincent Laporte
2025-04-04 06:26:41 +02:00
committed by Vincent Laporte
parent 729b0d0267
commit 33a287eb13
3 changed files with 32 additions and 40 deletions

View File

@@ -1,11 +1,9 @@
{
lib,
buildDunePackage,
ocaml,
ocaml_gettext,
camomile,
ounit,
fileutils,
ounit2,
}:
buildDunePackage {
@@ -13,15 +11,12 @@ buildDunePackage {
inherit (ocaml_gettext) src version;
propagatedBuildInputs = [
(camomile.override { version = "1.0.2"; })
camomile
ocaml_gettext
];
doCheck = lib.versionAtLeast ocaml.version "4.08";
checkInputs = [
ounit
fileutils
];
doCheck = true;
checkInputs = [ ounit2 ];
meta = (builtins.removeAttrs ocaml_gettext.meta [ "mainProgram" ]) // {
description = "Internationalization library using camomile (i18n)";

View File

@@ -1,22 +1,30 @@
{
lib,
fetchurl,
fetchpatch,
applyPatches,
buildDunePackage,
cppo,
gettext,
fileutils,
ounit,
ounit2,
}:
buildDunePackage rec {
pname = "gettext";
version = "0.4.2";
version = "0.5.0";
minimalOCamlVersion = "4.03";
src = fetchurl {
url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${version}/gettext-v${version}.tbz";
sha256 = "19ynsldb21r539fiwz1f43apsdnx7hj2a2d9qr9wg2hva9y2qrwb";
src = applyPatches {
src = fetchurl {
url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${version}/gettext-${version}.tbz";
hash = "sha256-CN2d9Vsq8YOOIxK+S+lCtDddvBjCrtDKGSRIh1DjT10=";
};
# Disable dune sites
# See https://github.com/gildor478/ocaml-gettext/pull/37
patches = fetchpatch {
url = "https://github.com/gildor478/ocaml-gettext/commit/5462396bee53cb13d8d6fde4c6d430412a17b64d.patch";
hash = "sha256-tOR+xgZTadvNeQpZnFTJEvZglK8P+ySvYnE3c1VWvKQ=";
};
};
nativeBuildInputs = [ cppo ];
@@ -26,12 +34,10 @@ buildDunePackage rec {
fileutils
];
# Tests for version 0.4.2 are not compatible with OUnit 2.2.6
# Tests of version 0.5.0 fail
doCheck = false;
checkInputs = [ ounit ];
dontStrip = true;
checkInputs = [ ounit2 ];
meta = with lib; {
description = "OCaml Bindings to gettext";

View File

@@ -1,31 +1,22 @@
{
lib,
buildDunePackage,
ocaml,
ocaml_gettext,
dune-configurator,
ounit,
ounit2,
}:
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
"gettext-stub is not available for OCaml ${ocaml.version}"
buildDunePackage {
pname = "gettext-stub";
inherit (ocaml_gettext) src version;
buildDunePackage
{
minimalOCamlVersion = "4.14";
pname = "gettext-stub";
buildInputs = [ dune-configurator ];
propagatedBuildInputs = [ ocaml_gettext ];
inherit (ocaml_gettext) src version;
doCheck = true;
checkInputs = [ ounit2 ];
minimalOCamlVersion = "4.06";
buildInputs = [ dune-configurator ];
propagatedBuildInputs = [ ocaml_gettext ];
doCheck = lib.versionAtLeast ocaml.version "4.08";
checkInputs = [ ounit ];
meta = builtins.removeAttrs ocaml_gettext.meta [ "mainProgram" ];
}
meta = builtins.removeAttrs ocaml_gettext.meta [ "mainProgram" ];
}