summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/notty/default.nix
blob: fd75593f41b8b4641e66ab9f1c4c0b508d9c8bd2 (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
{
  lib,
  buildDunePackage,
  fetchurl,
  fetchpatch,
  cppo,
  uutf,
  lwt,
}:

buildDunePackage (finalAttrs: {
  version = "0.2.3";
  pname = "notty";

  minimalOCamlVersion = "4.08";

  src = fetchurl {
    url = "https://github.com/pqwy/notty/releases/download/v${finalAttrs.version}/notty-${finalAttrs.version}.tbz";
    sha256 = "sha256-dGWfsUBz20Q4mJiRqyTyS++Bqkl9rBbZpn+aHJwgCCQ=";
  };

  # Compatibility with OCaml 5.4
  patches = fetchpatch {
    url = "https://github.com/pqwy/notty/commit/a4d62f467e257196a5192da2184bd021dfd948b7.patch";
    hash = "sha256-p1eUuCvQKLj8uBeGyT2+i9WOYy4rk84pf9L3QioJDNY=";
  };

  nativeBuildInputs = [ cppo ];

  propagatedBuildInputs = [
    lwt
    uutf
  ];

  meta = {
    homepage = "https://github.com/pqwy/notty";
    description = "Declarative terminal graphics for OCaml";
    license = lib.licenses.isc;
    maintainers = with lib.maintainers; [ sternenseemann ];
  };
})