From 5b3d105490154aaf83a7cdf56f78e73829a9dfc7 Mon Sep 17 00:00:00 2001
From: Lprndn <guix@lprndn.info>
Date: Thu, 24 Jan 2019 13:41:30 +0100
Subject: [PATCH] gnu: Add arcan-wayland.
* gnu/packages/arcan.scm (arcan-wayland): New variable.
---
gnu/packages/arcan.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
@@ -12,11 +12,13 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages databases)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages libusb)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages lua)
#:use-module (gnu packages ocr)
#:use-module (gnu packages pcre)
@@ -216,3 +218,33 @@ all the way to full-blown desktop environments")
(synopsis "Patched Xserver that bridges connections to Arcan")
(description "Patched Xserver that bridges connections to Arcan")
(license license:expat)))
+
+(define-public arcan-wayland
+ (package
+ (inherit arcan)
+ (name "arcan-wayland")
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("arcan" ,arcan)
+ ("libseccomp" ,libseccomp)
+ ("libxkbcommon" ,libxkbcommon)
+ ("mesa" ,mesa)
+ ("wayland" ,wayland)
+ ("wayland-protocols" ,wayland-protocols)))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "src/tools/waybridge")
+ #t))
+ (add-after 'unpack 'fix-cmake-find-shmif
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/platform/cmake/modules/Findarcan_shmif.cmake"
+ (("/usr/local") (string-append (assoc-ref inputs "arcan") "")))
+ #t)))))
+ (synopsis "Wayland protocol service for Arcan")
+ (description "Wayland protocol service for Arcan")
+ (license license:bsd-3)))
--
2.19.2