Merge pull request #378 from cpages/wayland

wayland: add weston and dependencies
This commit is contained in:
Vladimír Čunát 2013-03-16 11:38:34 -07:00
commit 516133a4fd
6 changed files with 76 additions and 10 deletions

View File

@ -0,0 +1,31 @@
{ stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon
, cairo, libxcb, libXcursor, x11, udev, libdrm, mtdev
, libjpeg, pam, autoconf, automake, libtool }:
let version = "1.0.5"; in
stdenv.mkDerivation rec {
name = "weston-${version}";
src = fetchurl {
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
sha256 = "0g2k82pnlxl8b70ykazj7kn8xffjfsmgcgx427qdrm4083z2hgm0";
};
buildInputs = [ pkgconfig wayland mesa libxkbcommon
cairo libxcb libXcursor x11 udev libdrm mtdev
libjpeg pam autoconf automake libtool ];
preConfigure = "autoreconf -vfi";
# prevent install target to chown root weston-launch, which fails
configureFlags = ''
--disable-setuid-install
'';
meta = {
description = "Reference implementation of a Wayland compositor";
homepage = http://wayland.freedesktop.org/;
license = stdenv.lib.licenses.mit;
};
}

View File

@ -2,15 +2,18 @@
, pdfSupport ? true , pdfSupport ? true
, pngSupport ? true , pngSupport ? true
, xcbSupport ? true # no longer experimental since 1.12 , xcbSupport ? true # no longer experimental since 1.12
, glSupport ? false
, gobjectSupport ? true, glib , gobjectSupport ? true, glib
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs , stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs
, expat , expat
, zlib, libpng, pixman , zlib, libpng, pixman, libxcb ? null, xcbutil ? null, mesa ? null
, gettext, libiconvOrEmpty , gettext, libiconvOrEmpty
}: }:
assert postscriptSupport -> zlib != null; assert postscriptSupport -> zlib != null;
assert pngSupport -> libpng != null; assert pngSupport -> libpng != null;
assert xcbSupport -> libxcb != null && xcbutil != null;
assert glSupport -> mesa != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cairo-1.12.14"; name = "cairo-1.12.14";
@ -23,6 +26,7 @@ stdenv.mkDerivation rec {
buildInputs = with xlibs; buildInputs = with xlibs;
[ pkgconfig x11 fontconfig libXrender expat ] [ pkgconfig x11 fontconfig libXrender expat ]
++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ] ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
++ stdenv.lib.optionals glSupport [ mesa ]
# On non-GNU systems we need GNU Gettext for libintl. # On non-GNU systems we need GNU Gettext for libintl.
++ stdenv.lib.optional (!stdenv.isLinux) gettext ++ stdenv.lib.optional (!stdenv.isLinux) gettext
@ -38,6 +42,7 @@ stdenv.mkDerivation rec {
configureFlags = configureFlags =
[ "--enable-tee" ] [ "--enable-tee" ]
++ stdenv.lib.optional xcbSupport "--enable-xcb" ++ stdenv.lib.optional xcbSupport "--enable-xcb"
++ stdenv.lib.optional glSupport "--enable-gl"
++ stdenv.lib.optional pdfSupport "--enable-pdf"; ++ stdenv.lib.optional pdfSupport "--enable-pdf";
preConfigure = preConfigure =

View File

@ -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;
};
}

View File

@ -1,7 +1,8 @@
{ stdenv, fetchurl, flex, bison, pkgconfig, intltool, libdrm, file, expat, makedepend { stdenv, fetchurl, flex, bison, pkgconfig, intltool, libdrm, file, expat, makedepend
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext , libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
, libXt, udev, enableTextureFloats ? false, enableR600LlvmCompiler ? false , 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 if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
throw "unsupported platform for Mesa" throw "unsupported platform for Mesa"
@ -26,6 +27,7 @@ stdenv.mkDerivation {
"" ""
+ " --enable-gles1 --enable-gles2 --enable-gallium-egl" + " --enable-gles1 --enable-gles2 --enable-gallium-egl"
+ " --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast" + " --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
+ " --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi"
+ stdenv.lib.optionalString enableR600LlvmCompiler " --enable-r600-llvm-compiler" + stdenv.lib.optionalString enableR600LlvmCompiler " --enable-r600-llvm-compiler"
# Texture floats are patented, see docs/patents.txt # Texture floats are patented, see docs/patents.txt
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float"; + stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
@ -33,6 +35,7 @@ stdenv.mkDerivation {
buildInputs = [ buildInputs = [
autoconf automake libtool intltool expat libxml2Python udev llvm autoconf automake libtool intltool expat libxml2Python udev llvm
libdrm libXxf86vm libXfixes libXdamage glproto dri2proto libX11 libXext libxcb libXt libdrm libXxf86vm libXfixes libXdamage glproto dri2proto libX11 libXext libxcb libXt
wayland
]; ];
nativeBuildInputs = [ pkgconfig python makedepend file flex bison ]; nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];

View File

@ -1,23 +1,21 @@
{ stdenv, fetchurl, libffi, expat, pkgconfig, libxslt, docbook_xsl, doxygen }: { stdenv, fetchurl, libffi, expat, pkgconfig, libxslt, docbook_xsl, doxygen }:
let version = "1.0.5"; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "wayland-1.0.5"; name = "wayland-${version}";
src = fetchurl { src = fetchurl {
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
sha256 = "130n7v5i7rfsrli2n8vdzfychlgd8v7by7sfgp8vfqdlss5km34w"; sha256 = "130n7v5i7rfsrli2n8vdzfychlgd8v7by7sfgp8vfqdlss5km34w";
}; };
buildInputs = [ pkgconfig libffi expat libxslt docbook_xsl doxygen ]; buildInputs = [ pkgconfig libffi expat libxslt docbook_xsl doxygen ];
meta = { meta = {
description = "The reference implementation of the Wayland protocol"; description = "Reference implementation of the wayland protocol";
homepage = http://wayland.freedesktop.org/;
homepage = http://wayland.freedesktop.org; license = stdenv.lib.licenses.mit;
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -4482,6 +4482,8 @@ let
libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { }; libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { };
libxkbcommon = callPackage ../development/libraries/libxkbcommon { };
libxklavier = callPackage ../development/libraries/libxklavier { }; libxklavier = callPackage ../development/libraries/libxklavier { };
libxmi = callPackage ../development/libraries/libxmi { }; libxmi = callPackage ../development/libraries/libxmi { };
@ -7941,6 +7943,12 @@ let
weechat = callPackage ../applications/networking/irc/weechat { }; weechat = callPackage ../applications/networking/irc/weechat { };
weston = callPackage ../applications/window-managers/weston {
cairo = cairo.override {
glSupport = true;
};
};
wings = callPackage ../applications/graphics/wings { }; wings = callPackage ../applications/graphics/wings { };
wmname = callPackage ../applications/misc/wmname { }; wmname = callPackage ../applications/misc/wmname { };