summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2025-03-01 14:17:17 +0800
committerHilton Chain <hako@ultrarare.space>2025-04-02 00:45:07 +0800
commitee1a40745ccde94cf18d90a80566ca65b0ea0408 (patch)
tree5f41680c1c8a1eb25146d53b1591f9010b99c7ea /gnu
parent7d36ad17a432a8b7df20bf31c0ef96c1716ef141 (diff)
gnu: Add xwayland-run.
* gnu/packages/xorg.scm (xwayland-run): New variable. Change-Id: I447913a9ef4fca8ec8cad128b15eeb61041ca734
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/xorg.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index db34a58f6e1..c7c60e738f8 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -6841,6 +6841,64 @@ the server and cleaning up before returning the exit status of the command.")
(license (list license:x11 ; the script
license:gpl2+)))) ; the man page
+(define-public xwayland-run
+ (package
+ (name "xwayland-run")
+ (version "0.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/ofourdan/xwayland-run.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1nhrdjk1zbxfxkqwsz992g6xg04gankprzks543931fysclgdzql"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:imported-modules
+ (append %meson-build-system-modules
+ %python-build-system-modules)
+ #:modules
+ '((guix build utils)
+ (guix build meson-build-system)
+ ((guix build python-build-system) #:prefix python:))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'enable-bytecode-determinism
+ (assoc-ref python:%standard-phases 'enable-bytecode-determinism))
+ (add-after 'install 'python-install
+ (lambda args
+ (for-each
+ (lambda (phase)
+ (apply (assoc-ref python:%standard-phases phase)
+ args))
+ '(add-install-to-pythonpath
+ add-install-to-path
+ wrap))))
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/wlheadless/xwayland.py"
+ (("'(xauth|Xwayland)'" _ command)
+ (format #f "'~a'" (search-input-file
+ inputs (in-vicinity "bin" command))))))))))
+ (inputs (list python xauth xorg-server-xwayland))
+ (home-page "https://gitlab.freedesktop.org/ofourdan/xwayland-run")
+ (synopsis "Run X11 client on dedicated Xwayland server")
+ (description
+ "@code{xwayland-run} contains a set of small utilities revolving around
+running @command{Xwayland} and various Wayland compositor headless, namely:
+@itemize
+@item @command{xwayland-run}: Spawn X11 client within its own dedicated
+@command{Xwayland} rootful instance.
+@item @command{wlheadless-run}: Run Wayland client on a set of supported
+Wayland headless compositors.
+@item @command{xwfb-run}: Combination of above two tools to be used as a
+direct replacement for @command{xvfb-run} specifically.
+@end itemize")
+ (license license:gpl2+)))
+
(define-public setroot
(package
(name "setroot")