diff --git a/pkgs/development/ocaml-modules/uunf/default.nix b/pkgs/development/ocaml-modules/uunf/default.nix index d69c22db802..25246806171 100644 --- a/pkgs/development/ocaml-modules/uunf/default.nix +++ b/pkgs/development/ocaml-modules/uunf/default.nix @@ -1,8 +1,11 @@ -{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner }: +{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner +, cmdlinerSupport ? lib.versionAtLeast cmdliner.version "1.1" +}: + let pname = "uunf"; webpage = "https://erratique.ch/software/${pname}"; - version = "14.0.0"; + version = "15.0.0"; in if lib.versionOlder ocaml.version "4.03" @@ -15,11 +18,12 @@ stdenv.mkDerivation { src = fetchurl { url = "${webpage}/releases/${pname}-${version}.tbz"; - sha256 = "sha256:17wv0nm3vvwcbzb1b09akw8jblmigyhbfmh1sy9lkb5756ni94a2"; + sha256 = "sha256-B/prPAwfqS8ZPS3fyDDIzXWRbKofwOCyCfwvh9veuug="; }; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; - buildInputs = [ topkg uutf cmdliner ]; + buildInputs = [ topkg uutf ] + ++ lib.optional cmdlinerSupport cmdliner; propagatedBuildInputs = [ uchar ]; @@ -27,7 +31,15 @@ stdenv.mkDerivation { prePatch = lib.optionalString stdenv.isAarch64 "ulimit -s 16384"; - inherit (topkg) buildPhase installPhase; + buildPhase = '' + runHook preBuild + ${topkg.run} build \ + --with-uutf true \ + --with-cmdliner ${lib.boolToString cmdlinerSupport} + runHook postBuild + ''; + + inherit (topkg) installPhase; meta = with lib; { description = "An OCaml module for normalizing Unicode text";