From 9a2b2e7b34190f553f41aa80297acf383700a19d Mon Sep 17 00:00:00 2001 From: David Virgilio Date: Thu, 20 Nov 2014 00:37:19 -0600 Subject: [PATCH 1/2] new package: xwayland --- pkgs/servers/x11/xorg/xwayland.nix | 41 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/servers/x11/xorg/xwayland.nix diff --git a/pkgs/servers/x11/xorg/xwayland.nix b/pkgs/servers/x11/xorg/xwayland.nix new file mode 100644 index 000000000000..ae625240798d --- /dev/null +++ b/pkgs/servers/x11/xorg/xwayland.nix @@ -0,0 +1,41 @@ + +{ stdenv, wayland, xorgserver, xkbcomp, xkeyboard_config, epoxy, libxslt, libunwind, makeWrapper } : + +with stdenv.lib; + +overrideDerivation xorgserver (oldAttrs: { + + name = "xwayland-${xorgserver.version}"; + propagatedNativeBuildInputs = oldAttrs.propagatedNativeBuildInputs + ++ [wayland epoxy libxslt makeWrapper libunwind]; + configureFlags = [ + "--disable-docs" + "--disable-devel-docs" + "--enable-xwayland" + "--disable-xorg" + "--disable-xvfb" + "--disable-xnest" + "--disable-xquartz" + "--disable-xwin" + "--with-default-font-path=" + "--with-xkb-bin-directory=${xkbcomp}/bin" + "--with-xkb-path=${xkeyboard_config}/etc/X11/xkb" + "--with-xkb-output=$out/share/X11/xkb/compiled" + ]; + + postInstall = '' + rm -fr $out/share/X11/xkb/compiled + ln -s /var/tmp $out/share/X11/xkb/compiled + ''; + +}) // { + meta = { + description = "An X server for interfacing X11 apps with the Wayland protocol"; + homepage = http://wayland.freedesktop.org/xserver.html; + license = licenses.mit; + platforms = platforms.linux; +}; +} + + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 55c7e9bb6442..b8dbe4c7b419 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7828,6 +7828,8 @@ let xorgVideoUnichrome = callPackage ../servers/x11/xorg/unichrome/default.nix { }; + xwayland = with xorg; callPackage ../servers/x11/xorg/xwayland.nix { }; + yaws = callPackage ../servers/http/yaws { }; zabbix = recurseIntoAttrs (import ../servers/monitoring/zabbix { From 1d131a09a42c47630248a75180882885d33d33b1 Mon Sep 17 00:00:00 2001 From: David Virgilio Date: Thu, 20 Nov 2014 05:40:37 -0600 Subject: [PATCH 2/2] update weston: add xwayland support --- pkgs/applications/window-managers/weston/default.nix | 8 +++++--- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix index 9a6708f1b140..a270bb8d4665 100644 --- a/pkgs/applications/window-managers/weston/default.nix +++ b/pkgs/applications/window-managers/weston/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon, cairo, libxcb , libXcursor, x11, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput , pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null -, libwebp ? null +, libwebp ? null, xwayland ? null }: let version = "1.6.0"; in @@ -21,7 +21,6 @@ stdenv.mkDerivation rec { ]; configureFlags = [ - "--enable-xwayland" "--enable-x11-compositor" "--enable-drm-compositor" "--enable-wayland-compositor" @@ -32,7 +31,10 @@ stdenv.mkDerivation rec { "--enable-weston-launch" "--disable-setuid-install" # prevent install target to chown root weston-launch, which fails ] ++ stdenv.lib.optional (freerdp != null) "--enable-rdp-compositor" - ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder"; + ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder" + ++ stdenv.lib.optional (xwayland != null) ( + "--enable-xwayland " + + "--with-xserver-path=${xwayland}/bin/Xwayland"); meta = with stdenv.lib; { description = "Reference implementation of a Wayland compositor"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8dbe4c7b419..84bbbdc728c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10965,6 +10965,7 @@ let vaapi = null; libva = null; libwebp = null; + xwayland = null; }; weston = callPackage ../applications/window-managers/weston {