From b89ab32c60373ae4c8ca7b6604ea3445afabca85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <vcunat@gmail.com>
Date: Mon, 23 Dec 2013 19:25:29 +0100
Subject: [PATCH] cogl: fix build, enable some features

---
 pkgs/development/libraries/cogl/default.nix | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix
index 9a151e88778b..1fc1021156d5 100644
--- a/pkgs/development/libraries/cogl/default.nix
+++ b/pkgs/development/libraries/cogl/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, mesa, glib, gdk_pixbuf, xorg, libintlOrEmpty
-, pangoSupport ? true, pango, cairo, gobjectIntrospection }:
+{ stdenv, fetchurl, pkgconfig, mesa_noglu, glib, gdk_pixbuf, xorg, libintlOrEmpty
+, pangoSupport ? true, pango, cairo, gobjectIntrospection, wayland }:
 
 let
   ver_maj = "1.16";
@@ -15,10 +15,19 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
 
-  configureFlags = " --enable-introspection " ;
+  configureFlags = [
+    "--enable-introspection"
+    "--enable-gles1"
+    "--enable-gles2"
+    "--enable-kms-egl-platform"
+    "--enable-wayland-egl-platform"
+    "--enable-wayland-egl-server"
+  ];
 
-  propagatedBuildInputs = with xorg;
-    [ mesa glib gdk_pixbuf libXfixes libXcomposite libXdamage gobjectIntrospection ]
+  propagatedBuildInputs = with xorg; [
+      glib gdk_pixbuf gobjectIntrospection
+      mesa_noglu libXrandr libXfixes libXcomposite libXdamage wayland
+    ]
     ++ libintlOrEmpty;
 
   buildInputs = stdenv.lib.optionals pangoSupport [ pango cairo ];