Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config, cairo
2, ApplicationServices }:
3
4buildDunePackage rec {
5 pname = "cairo2";
6 version = "0.6.4";
7
8 src = fetchurl {
9 url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tbz";
10 sha256 = "sha256-QDVzUtcgXTpXNYVWQ4MMs0Xy24OP+dGaUyAYdg1GigU=";
11 };
12
13 minimalOCamlVersion = "4.02";
14 useDune2 = true;
15
16 nativeBuildInputs = [ pkg-config ];
17 buildInputs = [ cairo dune-configurator ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices ];
18
19 doCheck = !(stdenv.isDarwin
20 # https://github.com/Chris00/ocaml-cairo/issues/19
21 || lib.versionAtLeast ocaml.version "4.10");
22
23 meta = with lib; {
24 homepage = "https://github.com/Chris00/ocaml-cairo";
25 description = "Binding to Cairo, a 2D Vector Graphics Library";
26 longDescription = ''
27 This is a binding to Cairo, a 2D graphics library with support for
28 multiple output devices. Currently supported output targets include
29 the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
30 and SVG file output.
31 '';
32 license = licenses.lgpl3;
33 maintainers = with maintainers; [ jirkamarsik vbgl ];
34 };
35}