From 8dc6f51966a91d9de2242dbd657308c9b2ca44a8 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 19 Sep 2022 18:46:45 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.uuseg:=2014.0.0=20=E2=86=92=2015.?= =?UTF-8?q?0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/uuseg/default.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/uuseg/default.nix b/pkgs/development/ocaml-modules/uuseg/default.nix index 9d19de1c3ce..6a97c5bbc33 100644 --- a/pkgs/development/ocaml-modules/uuseg/default.nix +++ b/pkgs/development/ocaml-modules/uuseg/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uucp, uutf, cmdliner }: +{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uucp, uutf, cmdliner +, cmdlinerSupport ? lib.versionAtLeast cmdliner.version "1.1" +}: let pname = "uuseg"; @@ -8,20 +10,29 @@ in stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-${pname}-${version}"; - version = "14.0.0"; + version = "15.0.0"; src = fetchurl { url = "${webpage}/releases/${pname}-${version}.tbz"; - sha256 = "sha256:1g9zyzjkhqxgbb9mh3cgaawscwdazv6y8kdqvmy6yhnimmfqv25p"; + sha256 = "sha256-q8x3bia1QaKpzrWFxUmLWIraKqby7TuPNGvbSjkY4eM="; }; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; - buildInputs = [ topkg cmdliner uutf ]; + buildInputs = [ topkg uutf ] + ++ lib.optional cmdlinerSupport cmdliner; propagatedBuildInputs = [ uucp ]; strictDeps = true; - 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 library for segmenting Unicode text";