summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/cairo/default.nix7
-rw-r--r--pkgs/development/libraries/libxkbcommon/default.nix21
-rw-r--r--pkgs/development/libraries/mesa/default.nix9
-rw-r--r--pkgs/development/libraries/wayland/default.nix14
4 files changed, 39 insertions, 12 deletions
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index f31a3a06e3ac..24d3bf5d3a6e 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -2,15 +2,18 @@
 , pdfSupport ? true
 , pngSupport ? true
 , xcbSupport ? true # no longer experimental since 1.12
+, glSupport ? false
 , gobjectSupport ? true, glib
 , stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs
 , expat
-, zlib, libpng, pixman
+, zlib, libpng, pixman, libxcb ? null, xcbutil ? null, mesa ? null
 , gettext, libiconvOrEmpty
 }:
 
 assert postscriptSupport -> zlib != null;
 assert pngSupport -> libpng != null;
+assert xcbSupport -> libxcb != null && xcbutil != null;
+assert glSupport -> mesa != null;
 
 stdenv.mkDerivation rec {
   name = "cairo-1.12.14";
@@ -23,6 +26,7 @@ stdenv.mkDerivation rec {
   buildInputs = with xlibs;
     [ pkgconfig x11 fontconfig libXrender expat ]
     ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
+    ++ stdenv.lib.optionals glSupport [ mesa ]
 
     # On non-GNU systems we need GNU Gettext for libintl.
     ++ stdenv.lib.optional (!stdenv.isLinux) gettext
@@ -38,6 +42,7 @@ stdenv.mkDerivation rec {
   configureFlags =
     [ "--enable-tee" ]
     ++ stdenv.lib.optional xcbSupport "--enable-xcb"
+    ++ stdenv.lib.optional glSupport "--enable-gl"
     ++ stdenv.lib.optional pdfSupport "--enable-pdf";
 
   preConfigure =
diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix
new file mode 100644
index 000000000000..4a1327778d47
--- /dev/null
+++ b/pkgs/development/libraries/libxkbcommon/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, yacc, flex, xkeyboard_config }:
+
+stdenv.mkDerivation rec {
+  name = "libxkbcommon-0.2.0";
+
+  src = fetchurl {
+    url = "http://xkbcommon.org/download/${name}.tar.bz2";
+    sha256 = "0hpvfa8p4bhvhc1gcb578m354p5idd192xb8zlaq16d33h90msvl";
+  };
+
+  buildInputs = [ yacc flex xkeyboard_config ];
+
+  configureFlags = ''
+    --with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb
+  '';
+
+  meta = {
+    description = "A library to handle keyboard descriptions";
+    homepage = http://xkbcommon.org;
+  };
+}
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 78d9805eb3fb..1a8ca9c94750 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, flex, bison, pkgconfig, intltool, libdrm, file, expat, makedepend
 , libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
 , libXt, udev, enableTextureFloats ? false, enableR600LlvmCompiler ? false
-, python, libxml2Python, autoconf, automake, libtool, llvm, writeText }:
+, python, libxml2Python, autoconf, automake, libtool, llvm, writeText
+, wayland }:
 
 if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
   throw "unsupported platform for Mesa"
@@ -24,8 +25,9 @@ stdenv.mkDerivation {
 
   configureFlags =
     ""
-    + " --enable-gles1 --enable-gles2 --enable-gallium-egl"
-    + " --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
+    + " --enable-gles1 --enable-gles2 --disable-gallium-egl"
+    + " --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi"
+    + " --with-gallium-drivers=nouveau,r300,r600,svga,swrast"
     + stdenv.lib.optionalString enableR600LlvmCompiler " --enable-r600-llvm-compiler"
     # Texture floats are patented, see docs/patents.txt
     + stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
@@ -33,6 +35,7 @@ stdenv.mkDerivation {
   buildInputs = [
     autoconf automake libtool intltool expat libxml2Python udev llvm
     libdrm libXxf86vm libXfixes libXdamage glproto dri2proto libX11 libXext libxcb libXt
+    wayland
   ];
 
   nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];
diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix
index 9e00b0d8bcf5..8854a41210b6 100644
--- a/pkgs/development/libraries/wayland/default.nix
+++ b/pkgs/development/libraries/wayland/default.nix
@@ -1,23 +1,21 @@
 { stdenv, fetchurl, libffi, expat, pkgconfig, libxslt, docbook_xsl, doxygen }:
 
+let version = "1.0.5"; in
+
 stdenv.mkDerivation rec {
-  name = "wayland-1.0.5";
+  name = "wayland-${version}";
 
   src = fetchurl {
     url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
-
     sha256 = "130n7v5i7rfsrli2n8vdzfychlgd8v7by7sfgp8vfqdlss5km34w";
   };
 
   buildInputs = [ pkgconfig libffi expat libxslt docbook_xsl doxygen ];
 
   meta = {
-    description = "The reference implementation of the Wayland protocol";
-
-    homepage = http://wayland.freedesktop.org;
-
-    license = stdenv.lib.licenses.bsd3;
-
+    description = "Reference implementation of the wayland protocol";
+    homepage = http://wayland.freedesktop.org/;
+    license = stdenv.lib.licenses.mit;
     platforms = stdenv.lib.platforms.all;
   };
 }