about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/camlimages/default.nix
blob: b1d3d51c866608e49d9cb197d65896d510d41907 (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
{ lib, fetchFromGitLab, buildDunePackage, findlib, dune-configurator, cppo
, graphics, lablgtk, stdio
}:

buildDunePackage rec {
  pname = "camlimages";
  version = "5.0.4";

  minimalOCamlVersion = "4.07";

  src = fetchFromGitLab {
    owner = "camlspotter";
    repo = pname;
    rev = version;
    sha256 = "1m2c76ghisg73dikz2ifdkrbkgiwa0hcmp21f2fm2rkbf02rq3f4";
  };

  postPatch = ''
    substituteInPlace core/{images,units}.ml --replace String.lowercase String.lowercase_ascii
  '';

  nativeBuildInputs = [ cppo ];
  buildInputs = [ dune-configurator findlib graphics lablgtk stdio ];

  meta = with lib; {
    branch = "5.0";
    inherit (src.meta) homepage;
    description = "OCaml image processing library";
    license = licenses.lgpl2;
    maintainers = [ maintainers.vbgl maintainers.mt-caret ];
  };
}