14 , gobject-introspection
20 , gstreamerSupport ? true
26 stdenv.mkDerivation rec {
31 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/cogl-${version}.tar.xz";
32 sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8";
36 # Some deepin packages need the following patches. They have been
37 # submitted by Fedora on the GNOME Bugzilla
38 # (https://bugzilla.gnome.org/787443). Upstream thinks the patch
39 # could be merged, but dev can not make a new release.
40 ./patches/gnome_bugzilla_787443_359589_deepin.patch
41 ./patches/gnome_bugzilla_787443_361056_deepin.patch
44 outputs = [ "out" "dev" ];
46 nativeBuildInputs = [ pkg-config libintl automake autoconf gobject-introspection ];
49 "--enable-introspection"
50 ] ++ lib.optionals (!stdenv.isDarwin) [
51 "--enable-kms-egl-platform"
52 "--enable-wayland-egl-platform"
53 "--enable-wayland-egl-server"
56 # Force linking against libGL.
57 # Otherwise, it tries to load it from the runtime library path.
59 ] ++ lib.optionals stdenv.isDarwin [
62 ] ++ lib.optionals gstreamerSupport [
66 # TODO: this shouldn't propagate so many things
67 # especially not gobject-introspection
68 propagatedBuildInputs = [
72 ] ++ lib.optionals stdenv.isLinux [
80 ] ++ lib.optionals gstreamerSupport [
82 gst_all_1.gst-plugins-base
85 buildInputs = lib.optionals pangoSupport [ pango cairo harfbuzz ]
86 ++ lib.optionals stdenv.isDarwin [ OpenGL ];
89 COGL_PANGO_DEP_CFLAGS = toString (lib.optionals (stdenv.isDarwin && pangoSupport) [
90 "-I${pango.dev}/include/pango-1.0"
91 "-I${cairo.dev}/include/cairo"
92 "-I${harfbuzz.dev}/include/harfbuzz"
94 } // lib.optionalAttrs stdenv.cc.isClang {
95 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
98 #doCheck = true; # all tests fail (no idea why)
101 updateScript = gnome.updateScript {
103 versionPolicy = "odd-unstable";
108 description = "A small open source library for using 3D graphics hardware for rendering";
109 maintainers = with maintainers; [ lovek323 ];
112 Cogl is a small open source library for using 3D graphics hardware for
113 rendering. The API departs from the flat state machine style of OpenGL
114 and is designed to make it easy to write orthogonal components that can
115 render without stepping on each other's toes.
118 platforms = platforms.unix;
119 license = with licenses; [ mit bsd3 publicDomain sgi-b-20 ];