summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/imagelib/default.nix
blob: 101a0e28b94ec63f1bfc6bdabd8ac47b30bc043f (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
{ lib, fetchurl, buildDunePackage, ocaml
, decompress, stdlib-shims, alcotest
}:

buildDunePackage rec {
  minimumOCamlVersion = "4.07";
  version = "20210511";
  pname = "imagelib";

  useDune2 = true;

  src = fetchurl {
    url = "https://github.com/rlepigre/ocaml-imagelib/releases/download/${version}/imagelib-${version}.tbz";
    sha256 = "1cb94ea3731dc994c205940c9434543ce3f2470cdcb2e93a3e02ed793e80d480";
  };

  propagatedBuildInputs = [ decompress stdlib-shims ];

  doCheck = lib.versionAtLeast ocaml.version "4.08";
  checkInputs = [ alcotest ];

  meta = {
    description = "Image formats such as PNG and PPM in OCaml";
    homepage = "https://github.com/rlepigre/ocaml-imagelib";
    license = lib.licenses.lgpl3;
    maintainers = [ lib.maintainers.vbgl ];
    mainProgram = "imagetool";
  };
}