summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/uuuu/default.nix
blob: 7d2eaac181df14d55c6a04843986edaf5629d05d (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
, fetchzip
, findlib
, lib
, menhir
, ocaml
, re
}:

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

  src = fetchzip {
    url = "https://github.com/mirage/uuuu/releases/download/v${version}/uuuu-v${version}.tbz";
    sha256 = "0457qcxvakbbc56frsh8a5v4y4l0raj9p4zz7jx3brn9255j1mw3";
  };

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

  useDune2 = true;

  nativeBuildInputs = [ menhir ];

  buildInputs = [ angstrom ];

  checkInputs = [ re ];
  doCheck = true;

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