nixpkgs/pkgs/development/ocaml-modules/uuseg/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

2022-09-19 16:46:45 +00:00
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uucp, uutf, cmdliner
, cmdlinerSupport ? lib.versionAtLeast cmdliner.version "1.1"
}:
let
pname = "uuseg";
webpage = "https://erratique.ch/software/${pname}";
in
2016-12-04 10:55:37 +00:00
stdenv.mkDerivation rec {
2016-12-04 10:55:37 +00:00
name = "ocaml${ocaml.version}-${pname}-${version}";
2022-09-19 16:46:45 +00:00
version = "15.0.0";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
2022-09-19 16:46:45 +00:00
sha256 = "sha256-q8x3bia1QaKpzrWFxUmLWIraKqby7TuPNGvbSjkY4eM=";
};
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
2022-09-19 16:46:45 +00:00
buildInputs = [ topkg uutf ]
++ lib.optional cmdlinerSupport cmdliner;
2021-10-03 20:03:56 +00:00
propagatedBuildInputs = [ uucp ];
strictDeps = true;
2022-09-19 16:46:45 +00:00
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";
2019-09-08 23:38:31 +00:00
homepage = webpage;
license = licenses.bsd3;
maintainers = [ maintainers.vbgl ];
mainProgram = "usegtrip";
inherit (ocaml.meta) platforms;
};
}