about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/uuuu/default.nix
blob: ed38329ae22b6b1e52ff15fee130378cb3ba2c36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ angstrom
, buildDunePackage
, fetchurl
, findlib
, lib
, ocaml
, re
}:

buildDunePackage rec {
  pname = "uuuu";
  version = "0.3.0";

  src = fetchurl {
    url = "https://github.com/mirage/uuuu/releases/download/v${version}/uuuu-${version}.tbz";
    sha256 = "sha256:19n39yc7spgzpk9i70r0nhkwsb0bfbvbgpf8d863p0a3wgryhzkb";
  };

  postPatch = ''
    substituteInPlace src/dune --replace 'ocaml} ' \
      'ocaml} -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib '
  '';

  nativeBuildInputs = [ findlib ];

  buildInputs = [ angstrom ];

  checkInputs = [ re ];
  doCheck = true;

  duneVersion = "3";

  meta = {
    description = "A library to normalize an ISO-8859 input to Unicode code-point";
    homepage = "https://github.com/mirage/uuuu";
    license = lib.licenses.mit;
    maintainers = [ ];
    mainProgram = "uuuu.generate";
  };
}