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

buildDunePackage rec {
  pname = "coin";
  version = "0.1.3";
  minimalOCamlVersion = "4.03";

  src = fetchzip {
    url = "https://github.com/mirage/coin/releases/download/v${version}/coin-v${version}.tbz";
    sha256 = "06bfidvglyp9hzvr2xwbdx8wf26is2xrzc31fldzjf5ab0vd076p";
  };

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

  useDune2 = true;

  nativeBuildInputs = [ menhir ];

  checkInputs = [ re ];
  doCheck = true;

  meta = {
    description = "A library to normalize an KOI8-{U,R} input to Unicode";
    license = lib.licenses.mit;
    homepage = "https://github.com/mirage/coin";
    maintainers = with lib.maintainers; [ ];
  };
}