2021-10-06 07:10:37 +02:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner }:
|
2014-07-09 09:42:26 +02:00
|
|
|
let
|
|
|
|
pname = "uunf";
|
2019-04-22 10:14:28 +02:00
|
|
|
webpage = "https://erratique.ch/software/${pname}";
|
2021-10-06 07:10:37 +02:00
|
|
|
version = "14.0.0";
|
2014-07-09 09:42:26 +02:00
|
|
|
in
|
2014-09-21 12:02:55 +02:00
|
|
|
|
2022-04-25 22:35:24 +02:00
|
|
|
if lib.versionOlder ocaml.version "4.03"
|
2021-10-06 07:10:37 +02:00
|
|
|
then throw "${pname} is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2014-09-21 12:02:55 +02:00
|
|
|
|
2020-08-14 07:42:07 +02:00
|
|
|
stdenv.mkDerivation {
|
2021-10-06 07:10:37 +02:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2020-08-14 07:42:07 +02:00
|
|
|
inherit version;
|
2014-07-09 09:42:26 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/releases/${pname}-${version}.tbz";
|
2021-10-06 07:10:37 +02:00
|
|
|
sha256 = "sha256:17wv0nm3vvwcbzb1b09akw8jblmigyhbfmh1sy9lkb5756ni94a2";
|
2014-07-09 09:42:26 +02:00
|
|
|
};
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
|
|
|
|
buildInputs = [ topkg uutf cmdliner ];
|
2016-12-04 11:33:02 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ uchar ];
|
2014-07-09 09:42:26 +02:00
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
2022-01-05 23:55:04 +01:00
|
|
|
prePatch = lib.optionalString stdenv.isAarch64 "ulimit -s 16384";
|
|
|
|
|
2016-12-04 11:33:02 +01:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
2014-07-09 09:42:26 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-07-09 09:42:26 +02:00
|
|
|
description = "An OCaml module for normalizing Unicode text";
|
2019-09-09 01:38:31 +02:00
|
|
|
homepage = webpage;
|
2014-09-21 12:02:55 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2022-05-09 19:30:27 +02:00
|
|
|
mainProgram = "unftrip";
|
|
|
|
inherit (ocaml.meta) platforms;
|
2014-07-09 09:42:26 +02:00
|
|
|
};
|
|
|
|
}
|