From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.5 Received: by atuin.qyliss.net (Postfix, from userid 496) id E37B9CDB; Thu, 1 Jul 2021 15:55:48 +0000 (UTC) Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id BB302BF9; Thu, 1 Jul 2021 15:55:13 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 505D9BBF; Thu, 1 Jul 2021 15:55:11 +0000 (UTC) Received: from wforward3-smtp.messagingengine.com (wforward3-smtp.messagingengine.com [64.147.123.22]) by atuin.qyliss.net (Postfix) with ESMTPS id 0AF81C35 for ; Thu, 1 Jul 2021 15:55:03 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailforward.west.internal (Postfix) with ESMTP id 990141AC10E8 for ; Thu, 1 Jul 2021 11:55:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 01 Jul 2021 11:55:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=GUFvvb3HV3G6WAitaFYa7fYcufzXsTrrvFQy0sKGGe4=; b=An3WczVw o1jRtdtz25qCaW5/4MnZB7kYeH4hpo4QSGmunf3ypzaCBOzFLLmNpNwcf78MWd8R rN6LnYslOyLCHw/krN38FY7h6ZKkKhlBEke8FfLD0XGYf6eY8SboD8W3t5THhh7L uIjiVONDPmW5KEzha0CP974EdolZi8CRXU6mazsReTbRS+emGwMg2+eLfy+lRa8U +vBZriL/7OcAW24rRddBjLwUcsI5ofmxgZKU8MgIwyFbGjkTqj60Bg1HPfVf1+/y Mpkkt18cFxbdWLtvNbyoDPZxw55G/hNcyhwQZJAw8yU3XO9HmytCPjuxsc3dwS2U Xk8gKwlQd+tnuw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeiiedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhi sheqnecuggftrfgrthhtvghrnhephfekteekkeegtddvkeevffdttdeludfhjeffudegle dvgfeivdehgfeltedvueeknecuffhomhgrihhnpehgvghtthihrdhruhhnnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepqhihlhhishhssegvvh gvrdhqhihlihhsshdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 1 Jul 2021 11:54:59 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id 0C6A41423; Thu, 1 Jul 2021 15:54:57 +0000 (UTC) From: Alyssa Ross 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 Message-Id: <20210701155446.1306212-3-hi@alyssa.is> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701155446.1306212-1-hi@alyssa.is> References: <20210701155446.1306212-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: U3FLBP67QHHQYYXRKPNMI44BZ6JSVMYG X-Message-ID-Hash: U3FLBP67QHHQYYXRKPNMI44BZ6JSVMYG X-MailFrom: qyliss@eve.qyliss.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.4 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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