1 { lib, stdenv, fetchurl, fetchpatch, pkg-config, libGL, glib, gdk-pixbuf, xorg, libintl
2 , pangoSupport ? true, pango, cairo, gobject-introspection, wayland, gnome3
3 , mesa, automake, autoconf
4 , gstreamerSupport ? true, gst_all_1 }:
8 in stdenv.mkDerivation rec {
9 name = "${pname}-${version}";
13 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
14 sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8";
18 # Some deepin packages need the following patches. They have been
19 # submitted by Fedora on the GNOME Bugzilla
20 # (https://bugzilla.gnome.org/787443). Upstream thinks the patch
21 # could be merged, but dev can not make a new release.
24 url = "https://bug787443.bugzilla-attachments.gnome.org/attachment.cgi?id=359589";
25 sha256 = "0f0d9iddg8zwy853phh7swikg4yzhxxv71fcag36f8gis0j5p998";
29 url = "https://bug787443.bugzilla-attachments.gnome.org/attachment.cgi?id=361056";
30 sha256 = "09fyrdci4727fg6qm5aaapsbv71sf4wgfaqz8jqlyy61dibgg490";
34 outputs = [ "out" "dev" ];
36 nativeBuildInputs = [ pkg-config libintl automake autoconf ];
39 "--enable-introspection"
40 "--enable-kms-egl-platform"
41 "--enable-wayland-egl-platform"
42 "--enable-wayland-egl-server"
43 ] ++ lib.optional gstreamerSupport "--enable-cogl-gst"
44 ++ lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ];
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 = gnome3.updateScript {
68 description = "A small open source library for using 3D graphics hardware for rendering";
69 maintainers = with maintainers; [ lovek323 ];
72 Cogl is a small open source library for using 3D graphics hardware for
73 rendering. The API departs from the flat state machine style of OpenGL
74 and is designed to make it easy to write orthogonal components that can
75 render without stepping on each other's toes.
78 platforms = platforms.mesaPlatforms;
79 license = with licenses; [ mit bsd3 publicDomain sgi-b-20 ];