21 pname = "ocaml-cairo";
24 if lib.versionAtLeast ocaml.version "4.06" then
25 throw "${pname} is not available for OCaml ${ocaml.version}"
28 stdenv.mkDerivation rec {
29 name = "${pname}-${version}";
33 url = "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-${version}.zip";
34 sha256 = "0l4p9bp6kclr570mxma8wafibr1g5fsjj8h10yr4b507g0hmlh0l";
37 patches = [ ./META.patch ];
59 createFindlibDestdir = true;
64 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE `pkg-config --cflags cairo gdk-pixbuf glib gtk+ pango`"
65 export LABLGTKDIR=${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2
66 cp ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2/pango.ml ./src
67 cp ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2/gaux.ml ./src
71 cp META $out/lib/ocaml/${ocaml.version}/site-lib/cairo/
74 makeFlags = [ "INSTALLDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/cairo" ];
77 homepage = "http://cairographics.org/cairo-ocaml";
78 description = "ocaml bindings for cairo library";
79 license = lib.licenses.gpl2;
80 inherit (ocaml.meta) platforms;