ocamlPackages.ocaml_gettext: fix for OCaml 5.4
This commit is contained in:
@@ -4,27 +4,36 @@
|
||||
fetchpatch,
|
||||
applyPatches,
|
||||
buildDunePackage,
|
||||
ocaml,
|
||||
cppo,
|
||||
gettext,
|
||||
fileutils,
|
||||
ounit2,
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
buildDunePackage (finalAttrs: {
|
||||
pname = "gettext";
|
||||
version = "0.5.0";
|
||||
|
||||
src = applyPatches {
|
||||
src = fetchurl {
|
||||
url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${version}/gettext-${version}.tbz";
|
||||
url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${finalAttrs.version}/gettext-${finalAttrs.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=";
|
||||
};
|
||||
patches = [
|
||||
# Disable dune sites
|
||||
# See https://github.com/gildor478/ocaml-gettext/pull/37
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gildor478/ocaml-gettext/commit/5462396bee53cb13d8d6fde4c6d430412a17b64d.patch";
|
||||
hash = "sha256-tOR+xgZTadvNeQpZnFTJEvZglK8P+ySvYnE3c1VWvKQ=";
|
||||
})
|
||||
]
|
||||
# Compatibility with OCaml ≥ 5.4
|
||||
# See https://github.com/gildor478/ocaml-gettext/pull/41
|
||||
++ lib.optional (lib.versionAtLeast ocaml.version "5.4") (fetchpatch {
|
||||
url = "https://github.com/gildor478/ocaml-gettext/commit/5d521981e39dcaeada6bbe7b15c5432d6de5d33c.patch";
|
||||
hash = "sha256-82ajmpyXSd2RdVq/ND4lS8PIugRSkKe5oL8BL9CsLo4=";
|
||||
});
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cppo ];
|
||||
@@ -46,4 +55,4 @@ buildDunePackage rec {
|
||||
maintainers = [ ];
|
||||
mainProgram = "ocaml-gettext";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user