diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix new file mode 100644 index 00000000000..2c1044d6937 --- /dev/null +++ b/pkgs/applications/window-managers/weston/default.nix @@ -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; + }; +} diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index f31a3a06e3a..24d3bf5d3a6 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 00000000000..4a1327778d4 --- /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 78d9805eb3f..e6f67b3455e 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" @@ -26,6 +27,7 @@ stdenv.mkDerivation { "" + " --enable-gles1 --enable-gles2 --enable-gallium-egl" + " --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" # 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 9e00b0d8bcf..8854a41210b 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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b547cc1f88d..f6ccc038c01 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4482,6 +4482,8 @@ let libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { }; + libxkbcommon = callPackage ../development/libraries/libxkbcommon { }; + libxklavier = callPackage ../development/libraries/libxklavier { }; libxmi = callPackage ../development/libraries/libxmi { }; @@ -7941,6 +7943,12 @@ let weechat = callPackage ../applications/networking/irc/weechat { }; + weston = callPackage ../applications/window-managers/weston { + cairo = cairo.override { + glSupport = true; + }; + }; + wings = callPackage ../applications/graphics/wings { }; wmname = callPackage ../applications/misc/wmname { };