Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
2let
3 pname = "uutf";
4in
5
6lib.throwIfNot (lib.versionAtLeast ocaml.version "4.03")
7 "${pname} is not available with OCaml ${ocaml.version}"
8
9stdenv.mkDerivation rec {
10 name = "ocaml${ocaml.version}-${pname}-${version}";
11 version = "1.0.3";
12
13 src = fetchurl {
14 url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
15 sha256 = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg=";
16 };
17
18 nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ];
19 buildInputs = [ topkg cmdliner ];
20 propagatedBuildInputs = [ uchar ];
21
22 strictDeps = true;
23
24 inherit (topkg) buildPhase installPhase;
25
26 meta = with lib; {
27 description = "Non-blocking streaming Unicode codec for OCaml";
28 homepage = "https://erratique.ch/software/uutf";
29 license = licenses.bsd3;
30 maintainers = [ maintainers.vbgl ];
31 mainProgram = "utftrip";
32 inherit (ocaml.meta) platforms;
33 };
34}