From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 13D2556CEE; Fri, 21 Jul 2023 18:01:18 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id DD79756C4D; Fri, 21 Jul 2023 18:01:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by atuin.qyliss.net (Postfix) with ESMTPS id 1909856C4B for ; Fri, 21 Jul 2023 18:01:11 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id B2265320093C for ; Fri, 21 Jul 2023 14:01:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 21 Jul 2023 14:01:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1689962469; x= 1690048869; bh=ECITeVnhIx7EeiUEIhZPoWruRiVeY9zbDc2v2dCos2I=; b=j FYGNwm0lsLkNYyYrkdMYO58ja0JoJ2l7h+lgF2k2lBsFSHeS6lRGrnI4Gl5vBuKc nSnzMxYH8hSrafkGF/jwWcvZDq2gMNlWgMrgjXKHmqjSXrJ8DDen859OmYnyTwJE ANJFqLxJWLfJjq+IkbSoiK4bPlByzUChW2SSHhnQ11hQIRibTtT2M0R/ufFtUK2I aNgn6HCS/RJo2vRuOcVAHqRB8ZbZ5bY3PrMIRCC32le81dQI21qkdmnpZe+7ws3F tINbU+4B9ZK7wvi7ZMLtdn4UzUwVUFGjDhrk7z5jJ0HKV7mOvRjnUqqjIJl+fnt8 OZ3cd2mOZ3ZlY98kNLRTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1689962469; x=1690048869; bh=E CITeVnhIx7EeiUEIhZPoWruRiVeY9zbDc2v2dCos2I=; b=G4GJWwGF+VPS0rVm7 kkj7MfwSMyrEV+JE01zPna5EQMNiQ+r4a06SdAnoud4Ov4a5peBU4/tGkrRKVVls XHNDADmeXBp+p1xU9wAmGznJo/2YYB/ozr+14olp3Ep69PCqWdvQhEdGgV3XwjAv xORRVNVP5evOiI8VNE2rPl9TWlJYDHv/4WvDmcH+0PlXZftHHRZb28YgkhYeKMd6 P7rh/BmcXhsCyV+WYWmn6jrxf8xVcTjldLQKQVvvx7OypCZX/BgUKPvc0IPHpqet PVtTRIrTWyk00y5A/n2cXnXu3TXIhjEXfgVMYaVTgI50x2NGYzwcGguPvrISgJFc 9KQfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrhedvgdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhi sheqnecuggftrfgrthhtvghrnhepveejuedtfeelkefgffeugeehtdehleefudeugeegtd fhvdffheduueekffejkedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihssh grrdhish X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 21 Jul 2023 14:01:08 -0400 (EDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id C2D2D7331; Fri, 21 Jul 2023 18:01:07 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH v3 6/6] vm/app: add hello-wayland demo VM Date: Fri, 21 Jul 2023 18:00:21 +0000 Message-Id: <20230721180015.597099-7-hi@alyssa.is> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230721180015.597099-1-hi@alyssa.is> References: <20230721180015.597099-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: UOTXUSMB6NTUEYN42F27EDHCR4UZM5HB X-Message-ID-Hash: UOTXUSMB6NTUEYN42F27EDHCR4UZM5HB X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.5 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Alyssa Ross hello-wayland is the simplest possible Wayland client. This VM is used to demonstrate Spectrum's new Wayland capabilities. Signed-off-by: Alyssa Ross Signed-off-by: Alyssa Ross --- host/initramfs/extfs.nix | 4 +++- vm/app/hello-wayland.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 vm/app/hello-wayland.nix diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix index 6f32bca..174fc81 100644 --- a/host/initramfs/extfs.nix +++ b/host/initramfs/extfs.nix @@ -10,6 +10,7 @@ let }; appvm-catgirl = import ../../vm/app/catgirl.nix { inherit config; }; + appvm-hello-wayland = import ../../vm/app/hello-wayland.nix { inherit config; }; appvm-lynx = import ../../vm/app/lynx.nix { inherit config; }; appvm-mg = import ../../vm/app/mg.nix { inherit config; }; in @@ -17,13 +18,14 @@ in runCommand "ext.ext4" { nativeBuildInputs = [ e2fsprogs ]; } '' - mkdir -p root/svc/data/appvm-{catgirl,lynx,mg} + mkdir -p root/svc/data/appvm-{catgirl,hello-wayland,lynx,mg} cd root tar -C ${netvm} -c data | tar -C svc -x chmod +w svc/data tar -C ${appvm-catgirl} -c . | tar -C svc/data/appvm-catgirl -x + tar -C ${appvm-hello-wayland} -c . | tar -C svc/data/appvm-hello-wayland -x tar -C ${appvm-lynx} -c . | tar -C svc/data/appvm-lynx -x tar -C ${appvm-mg} -c . | tar -C svc/data/appvm-mg -x diff --git a/vm/app/hello-wayland.nix b/vm/app/hello-wayland.nix new file mode 100644 index 0000000..e10f05e --- /dev/null +++ b/vm/app/hello-wayland.nix @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2022 Unikie +# SPDX-FileCopyrightText: 2023 Alyssa Ross + +import ../../lib/eval-config.nix ({ config, ... }: + +import ../make-vm.nix { inherit config; } { + wayland = true; + run = config.pkgs.pkgsStatic.callPackage ( + { writeScript, hello-wayland }: + writeScript "run-hello-wayland" '' + #!/bin/execlineb -P + foreground { ln -ns /run/ext /run/opengl-driver } + foreground { mkdir /run/user } + foreground { + umask 077 + mkdir /run/user/0 + } + if { /etc/mdev/wait card0 } + export XDG_RUNTIME_DIR /run/user/0 + + # No pkgsStatic.wayland-proxy-virtwl: + # https://github.com/nix-ocaml/nix-overlays/issues/698 + ${config.pkgs.pkgsMusl.wayland-proxy-virtwl}/bin/wayland-proxy-virtwl --virtio-gpu + + ${hello-wayland}/bin/hello-wayland + '' + ) { }; +}) -- 2.40.1