From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [PATCH nixpkgs 2/2] spectrumPackages.sys-vms.comp: switch to tinywl
Date: Thu, 1 Jul 2021 15:54:46 +0000 [thread overview]
Message-ID: <20210701155446.1306212-3-hi@alyssa.is> (raw)
In-Reply-To: <20210701155446.1306212-1-hi@alyssa.is>
Recent versions of wlroots (not yet in Spectrum's Nixpkgs) make it
impossible to use Wayfire as a Wayland client over Virtio Wayland,
because of an architectural change in wlroots that means dma-bufs are
now required to use the GLES2 renderer, which is the only one Wayfire
supports, with the Wayland backend. Sommelier as a compositor does
not (and cannot) support the zwp_linux_dmabuf_v1 Wayland protocol this
requires, because to do so it would have to be able to send dma-bufs
allocated by the guest client over Virtio Wayland. (This isn't
possible because of general difficulties with guest->host memory
sharing.)
The "comp" VM as it stands is designed to be used with spectrum-vm, as
a demo that people can run on their non-Spectrum systems, and see a
Wayland compositor appear as a Wayland window in their host
compositor. Since it's no longer possible to use Wayfire for this use
case, let's use tinywl here instead, since we have no requirements
that it doesn't fulfill as a minimum-viable compositor.
This doesn't change anything regarding non-demo uses of Spectrum.
Running a Wayland compositor itself as a Wayland client is not an
activity that really makes sense in an actual Spectrum system.
Realistic use cases for Wayland compositors in Spectrum (on a host
system, or in a VM with a GPU passed through, or possibly in a VM with
virtio-gpu) are not affected by this limitation, since in all cases
the compositor would render directly to a GPU, not to a Wayland window
to be displayed by another compositor.
---
.../linux/spectrum/vm/comp/default.nix | 31 ++++++-------------
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git a/pkgs/os-specific/linux/spectrum/vm/comp/default.nix b/pkgs/os-specific/linux/spectrum/vm/comp/default.nix
index 988fad5fba6..9b1490e33cb 100644
--- a/pkgs/os-specific/linux/spectrum/vm/comp/default.nix
+++ b/pkgs/os-specific/linux/spectrum/vm/comp/default.nix
@@ -1,13 +1,13 @@
{ lib, makeRootfs, runCommand, writeScript, writeText
, busybox, emacs26-nox, execline, gcc, linux_vm, s6, sommelier, source-code-pro
-, wayfire, westonLite, zsh
+, tinywl, westonLite, zsh
}:
runCommand "vm-comp" rec {
linux = linux_vm;
path = [
- busybox emacs26-nox execline gcc s6 sommelier wayfire westonLite zsh
+ busybox emacs26-nox execline gcc s6 sommelier tinywl westonLite zsh
];
login = writeScript "login" ''
@@ -16,20 +16,6 @@ runCommand "vm-comp" rec {
${busybox}/bin/login -p -f root $@
'';
- # This can't be /etc/wayfire/defaults.ini because autostart entries
- # from that file aren't applied.
- wayfireConfig = writeText "wayfire-config" ''
- [core]
- xwayland = false
-
- [input]
- xkb_layout = us
- xkb_variant = dvorak
-
- [autostart]
- terminal = weston-terminal --shell $(command -v zsh)
- '';
-
rootfs = makeRootfs {
services.getty.run = writeScript "getty-run" ''
#! ${execline}/bin/execlineb -P
@@ -41,15 +27,15 @@ runCommand "vm-comp" rec {
bundle
'';
contents = writeText "ok-all-contents" ''
- wayfire
+ compositor
'';
};
- rcServices.wayfire = {
- type = writeText "wayfire-type" ''
+ rcServices.compositor = {
+ type = writeText "compositor-type" ''
longrun
'';
- run = writeScript "wayfire-run" ''
+ run = writeScript "compositor-run" ''
#! ${execline}/bin/execlineb -S0
s6-applyuidgid -u 1000 -g 1000
@@ -57,11 +43,12 @@ runCommand "vm-comp" rec {
export HOME /
export PATH ${lib.makeBinPath path}
export XDG_RUNTIME_DIR /run/user/1000
+ export XKB_DEFAULT_LAYOUT dvorak
${sommelier}/bin/sommelier
- wayfire -c ${wayfireConfig}
+ ${tinywl}/bin/tinywl -s "weston-terminal --shell $(command -v zsh)"
'';
- dependencies = writeText "wayfire-dependencies" ''
+ dependencies = writeText "compositor-dependencies" ''
wl0
'';
};
--
2.32.0
prev parent reply other threads:[~2021-07-01 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 15:54 [PATCH nixpkgs 0/2] spectrumPackages.spectrum-vm: switch compositor from Wayfire " Alyssa Ross
2021-07-01 15:54 ` [PATCH nixpkgs 1/2] tinywl: init at 0.11.0 Alyssa Ross
2021-07-01 15:54 ` Alyssa Ross [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210701155446.1306212-3-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.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://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
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 NNTP newsgroup(s).