depot/pkgs/development/ocaml-modules/cairo2/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

35 lines
1.2 KiB
Nix

{ stdenv, lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config, cairo
, ApplicationServices }:
buildDunePackage rec {
pname = "cairo2";
version = "0.6.4";
src = fetchurl {
url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tbz";
sha256 = "sha256-QDVzUtcgXTpXNYVWQ4MMs0Xy24OP+dGaUyAYdg1GigU=";
};
minimalOCamlVersion = "4.02";
useDune2 = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ cairo dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ];
doCheck = !(stdenv.hostPlatform.isDarwin
# https://github.com/Chris00/ocaml-cairo/issues/19
|| lib.versionAtLeast ocaml.version "4.10");
meta = with lib; {
homepage = "https://github.com/Chris00/ocaml-cairo";
description = "Binding to Cairo, a 2D Vector Graphics Library";
longDescription = ''
This is a binding to Cairo, a 2D graphics library with support for
multiple output devices. Currently supported output targets include
the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
and SVG file output.
'';
license = licenses.lgpl3;
maintainers = with maintainers; [ jirkamarsik vbgl ];
};
}