unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Craven <david@craven.ch>
To: guix-devel@gnu.org
Subject: [PATCH 9/9] gnu: Add weston.
Date: Thu,  1 Sep 2016 17:57:11 +0200	[thread overview]
Message-ID: <20160901155711.7388-9-david@craven.ch> (raw)
In-Reply-To: <20160901155711.7388-1-david@craven.ch>

* gnu/packages/wayland.scm (weston): New file.
* gnu/local.mk (GNU_PACKAGE_MODULES): Add it.
---
 gnu/local.mk             |   1 +
 gnu/packages/wayland.scm | 130 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+)
 create mode 100644 gnu/packages/wayland.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 61287fd..898b2d7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -356,6 +356,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/vpn.scm				\
   %D%/packages/vtk.scm				\
   %D%/packages/w3m.scm				\
+  %D%/packages/wayland.scm			\
   %D%/packages/wdiff.scm			\
   %D%/packages/web.scm				\
   %D%/packages/webkit.scm			\
diff --git a/gnu/packages/wayland.scm b/gnu/packages/wayland.scm
new file mode 100644
index 0000000..0124d1b
--- /dev/null
+++ b/gnu/packages/wayland.scm
@@ -0,0 +1,130 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven <david@craven.ch>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages wayland)
+  #:use-module (gnu packages freedesktop) ; xwayland
+  #:use-module (gnu packages gl) ; cairo-xcb
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk) ; cairo-xcb
+  #:use-module (gnu packages libunwind)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg) ; xwayland
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix utils))
+
+(define-public cairo-xcb
+  (package
+    (inherit cairo)
+    (name "cairo-xcb")
+    (inputs
+     `(("mesa" ,mesa)
+       ,@(package-inputs cairo)))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))))
+
+(define-public xwayland
+  (package
+    (inherit xorg-server)
+    (name "xwayland")
+    (inputs
+     `(("libepoxy" ,libepoxy)
+       ("wayland" ,wayland)
+       ,@(package-inputs xorg-server)))
+    (arguments
+      (substitute-keyword-arguments (package-arguments xorg-server)
+        ((#:configure-flags flags)
+         `(cons* "--enable-xwayland" "--disable-xorg"
+                 "--disable-docs"    "--disable-devel-docs"
+                 "--disable-xvfb"    "--disable-xnest"
+                 "--disable-xquartz" "--disable-xwin"
+                 ,flags))))))
+
+(define-public weston
+  (package
+    (name "weston")
+    (version "1.11.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://wayland.freedesktop.org/releases/"
+                    "weston-" version ".tar.xz"))
+              (sha256
+               (base32
+                "09biddxw3ar797kxf9mywjkb2iwky6my39gpp51ni846y7lqdq05"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("xorg-server" ,xorg-server)))
+    (inputs
+     `(("cairo" ,cairo-xcb)
+       ("dbus" ,dbus)
+       ("elogind" ,elogind)
+       ("libinput" ,libinput-minimal)
+       ("libunwind" ,libunwind)
+       ("libxcursor" ,libxcursor)
+       ("libxkbcommon" ,libxkbcommon)
+       ("mesa" ,mesa)
+       ("mtdev" ,mtdev)
+       ("linux-pam" ,linux-pam)
+       ("wayland" ,wayland)
+       ("wayland-protocols" ,wayland-protocols)
+       ("xwayland" ,xwayland)))
+    (arguments
+     `(#:configure-flags
+       (list "--disable-setuid-install"
+             "--enable-systemd-login"
+             (string-append "--with-xserver-path="
+                            (assoc-ref %build-inputs "xwayland") "/bin/Xwayland"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'use-elogind
+           (lambda _
+             ;; Use elogind instead of systemd
+             (substitute* "configure"
+               (("libsystemd-login >= 198") "libelogind"))
+             (substitute* '("src/launcher-logind.c" "src/weston-launch.c")
+               (("#include <systemd/sd-login.h>")
+                "#include <elogind/sd-login.h>"))))
+         (add-after 'configure 'patch-confdefs.h
+           (lambda _
+             (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")))
+         (add-before 'check 'setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             #t))
+         (add-before 'check 'start-xorg-server
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; The test suite requires a running X server.
+             (system (string-append (assoc-ref inputs "xorg-server")
+                                    "/bin/Xvfb :1 &"))
+             (setenv "DISPLAY" ":1")
+             #t)))))
+    (home-page "https://wayland.freedesktop.org")
+    (synopsis "Reference implementation of a Wayland compositor")
+    (description "Weston is the reference implementation of a Wayland
+compositor, and a useful compositor in its own right.")
+    (license license:expat)))
-- 
2.9.0

  parent reply	other threads:[~2016-09-01 15:58 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 15:57 [PATCH 1/9] system: vm: Remove -net user flag David Craven
2016-09-01 15:57 ` [PATCH 2/9] activation: Allow /var/lib to be a home directory David Craven
2016-09-02 11:54   ` 宋文武
2016-09-02 15:31     ` Vincent Legoll
2016-09-02 17:13       ` ng0
2016-09-02 17:19         ` David Craven
2016-09-03 13:24   ` Ludovic Courtès
2016-09-01 15:57 ` [PATCH 3/9] services: Export initrc David Craven
2016-09-03 13:34   ` Ludovic Courtès
2016-09-03 13:34     ` David Craven
2016-09-03 17:33       ` David Craven
2016-09-05  8:40       ` Ludovic Courtès
2016-09-01 15:57 ` [PATCH 4/9] services: syslog: Use syslog-configuration David Craven
2016-09-02 12:31   ` Ludovic Courtès
2016-09-01 15:57 ` [PATCH 5/9] gnu: Add prefix to license imports in (gnu packages display-managers) David Craven
2016-09-02 12:27   ` Ludovic Courtès
2016-09-01 15:57 ` [PATCH 6/9] gnu: Add greenisland David Craven
2016-09-02 13:20   ` Ludovic Courtès
2016-09-03 17:03     ` David Craven
2016-09-05  8:43       ` Ludovic Courtès
2016-09-05 11:44         ` David Craven
2016-09-07  6:50   ` Mark H Weaver
2016-09-01 15:57 ` [PATCH 7/9] gnu: Add sddm David Craven
2016-09-02 12:26   ` Ludovic Courtès
2016-09-01 15:57 ` [PATCH 8/9] services: Add sddm service David Craven
2016-09-02 12:26   ` 宋文武
2016-09-03 13:32     ` Ludovic Courtès
2016-09-03 13:34       ` David Craven
2016-09-03 13:36         ` David Craven
2016-09-05  8:39           ` Ludovic Courtès
2016-09-05  8:38         ` Ludovic Courtès
2016-09-01 15:57 ` David Craven [this message]
2016-09-01 16:00   ` [PATCH 9/9] gnu: Add weston David Craven
2016-09-03 13:29   ` Ludovic Courtès
2016-09-04 14:01     ` David Craven
2016-09-05 21:15       ` Ludovic Courtès
2016-09-06 16:03         ` David Craven
2016-09-07  6:45   ` Mark H Weaver
2016-09-07  7:08     ` David Craven
2016-09-02 11:19 ` [PATCH 1/9] system: vm: Remove -net user flag ng0
2016-09-02 12:24   ` David Craven
2016-09-02 12:58     ` ng0
2016-09-02 13:00       ` David Craven
2016-09-03 13:39     ` Ludovic Courtès
2016-09-03 13:44       ` David Craven
2016-09-05  8:41         ` Ludovic Courtès
2016-09-02 15:37 ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160901155711.7388-9-david@craven.ch \
    --to=david@craven.ch \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).