ocamlPackages.gettext: 0.4.2 → 0.5.0

Changed files
+32 -40
pkgs
development
ocaml-modules
+4 -9
pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix
···
{
lib,
buildDunePackage,
-
ocaml,
ocaml_gettext,
camomile,
-
ounit,
-
fileutils,
+
ounit2,
}:
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)";
+17 -11
pkgs/development/ocaml-modules/ocaml-gettext/default.nix
···
{
lib,
fetchurl,
+
fetchpatch,
+
applyPatches,
buildDunePackage,
cppo,
gettext,
fileutils,
-
ounit,
+
ounit2,
}:
buildDunePackage rec {
pname = "gettext";
-
version = "0.4.2";
-
-
minimalOCamlVersion = "4.03";
+
version = "0.5.0";
-
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 ];
···
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";
+11 -20
pkgs/development/ocaml-modules/ocaml-gettext/stub.nix
···
{
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" ];
+
}