summaryrefslogtreecommitdiff
path: root/pkgs/development/ocaml-modules/ocaml-gettext/default.nix
blob: 1b32c0eb997caf4fbcf3f5b2b73d816aabf25266 (about) (plain)
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
41
42
43
44
45
46
47
48
49
{
  lib,
  fetchurl,
  fetchpatch,
  applyPatches,
  buildDunePackage,
  cppo,
  gettext,
  fileutils,
  ounit2,
}:

buildDunePackage rec {
  pname = "gettext";
  version = "0.5.0";

  src = applyPatches {
    src = fetchurl {
      url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${version}/gettext-${version}.tbz";
      hash = "sha256-CN2d9Vsq8YOOIxK+S+lCtDddvBjCrtDKGSRIh1DjT10=";
    };
    # Disable dune sites
    # See https://github.com/gildor478/ocaml-gettext/pull/37
    patches = fetchpatch {
      url = "https://github.com/gildor478/ocaml-gettext/commit/5462396bee53cb13d8d6fde4c6d430412a17b64d.patch";
      hash = "sha256-tOR+xgZTadvNeQpZnFTJEvZglK8P+ySvYnE3c1VWvKQ=";
    };
  };

  nativeBuildInputs = [ cppo ];

  propagatedBuildInputs = [
    gettext
    fileutils
  ];

  # Tests of version 0.5.0 fail
  doCheck = false;

  checkInputs = [ ounit2 ];

  meta = with lib; {
    description = "OCaml Bindings to gettext";
    homepage = "https://github.com/gildor478/ocaml-gettext";
    license = licenses.lgpl21;
    maintainers = [ ];
    mainProgram = "ocaml-gettext";
  };
}