1 { lib, stdenv, fetchurl, fetchpatch, pkg-config, libGL, glib, gdk-pixbuf, xorg, libintl
2 , pangoSupport ? true, pango, cairo, gobject-introspection, wayland, gnome
3 , mesa, automake, autoconf
4 , gstreamerSupport ? true, gst_all_1 }:
6 stdenv.mkDerivation rec {
11 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/cogl-${version}.tar.xz";
12 sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8";
16 # Some deepin packages need the following patches. They have been
17 # submitted by Fedora on the GNOME Bugzilla
18 # (https://bugzilla.gnome.org/787443). Upstream thinks the patch
19 # could be merged, but dev can not make a new release.
22 url = "https://bug787443.bugzilla-attachments.gnome.org/attachment.cgi?id=359589";
23 sha256 = "0f0d9iddg8zwy853phh7swikg4yzhxxv71fcag36f8gis0j5p998";
27 url = "https://bug787443.bugzilla-attachments.gnome.org/attachment.cgi?id=361056";
28 sha256 = "09fyrdci4727fg6qm5aaapsbv71sf4wgfaqz8jqlyy61dibgg490";
32 outputs = [ "out" "dev" ];
34 nativeBuildInputs = [ pkg-config libintl automake autoconf gobject-introspection ];
37 "--enable-introspection"
38 "--enable-kms-egl-platform"
39 "--enable-wayland-egl-platform"
40 "--enable-wayland-egl-server"
41 ] ++ lib.optional gstreamerSupport "--enable-cogl-gst"
42 ++ lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ];
44 # TODO: this shouldn't propagate so many things
45 # especially not gobject-introspection
46 propagatedBuildInputs = with xorg; [
47 glib gdk-pixbuf gobject-introspection wayland mesa
48 libGL libXrandr libXfixes libXcomposite libXdamage
50 ++ lib.optionals gstreamerSupport [ gst_all_1.gstreamer
51 gst_all_1.gst-plugins-base ];
53 buildInputs = lib.optionals pangoSupport [ pango cairo ];
56 = lib.optionalString (stdenv.isDarwin && pangoSupport)
57 "-I${pango.dev}/include/pango-1.0 -I${cairo.dev}/include/cairo";
59 #doCheck = true; # all tests fail (no idea why)
62 updateScript = gnome.updateScript {
64 versionPolicy = "odd-unstable";
69 description = "A small open source library for using 3D graphics hardware for rendering";
70 maintainers = with maintainers; [ lovek323 ];
73 Cogl is a small open source library for using 3D graphics hardware for
74 rendering. The API departs from the flat state machine style of OpenGL
75 and is designed to make it easy to write orthogonal components that can
76 render without stepping on each other's toes.
79 platforms = platforms.mesaPlatforms;
80 license = with licenses; [ mit bsd3 publicDomain sgi-b-20 ];