From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 24E5772860; Fri, 30 Sep 2022 21:36:24 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id ED49F727C2; Fri, 30 Sep 2022 21:36:20 +0000 (UTC) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by atuin.qyliss.net (Postfix) with ESMTPS id D5847726F0 for ; Fri, 30 Sep 2022 21:36:18 +0000 (UTC) Received: by mail-ej1-x633.google.com with SMTP id lc7so11651155ejb.0 for ; Fri, 30 Sep 2022 14:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=HECgpQSJDzaPolGLRQlWORT/d39IuqJGeETWlgi4XY0=; b=V+0cq94tiFD1WUNxlt1SRNmybL0CQQ2uKq+hpE+mZm5bvwOt731IffW1aDLxIGVaec JMUSxEZwl/UNevCbb1hcMrRJE/98jGS94jhR/4c8aoMUHmzCaFYXdtQUYG1CXZhwjvzB 4Oo+cJBNOc6Vgi8uV9lRcV2+0JvJC+l1fEY96DnjGCCHCHROv5x+KU6mjssoLWmcJCqP zZgPn2wL3bN/YikApxeTUJuLkPXJ4TTimFGK4KfC4vyeI24qNe3ksn0Lz1av7NSUrepL VPLlxXJUwDjKJtrQ7V+kh9vABliy+7ErdxhipWL4zqML3yhULZzZVdMyjWvoaIXQEsh+ 6WOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=HECgpQSJDzaPolGLRQlWORT/d39IuqJGeETWlgi4XY0=; b=IFkEl5nRpxtL5xiqi1j43uzM1YsDg7Fas6AlFd4zs42V6aWuGA/Lcp7HNd2BM4GKNb QQ1kKNgfrSVijfu5gVA50PatTDKCAeN7ZC/pMyEb1Rjfuwx9g5fajK9zYoJe5dx955jD l6yX6CcbfO6U6Dp14DyX/+pwWxS0yQi+YqGKXiiuyzObx2NYpnr94zcFJWnoQ1pWSOd3 8h+kbPviyOqn5+SKA0Cnq+Z9pcpgi9eLxdLx0e9Df32L8RvHWAWwu1e889pBd3AqsOKJ Z4PH2V6SaK5slx0LYus3J0I5RgC6rzar5vMH46NpSAwMoenWIU9BJ1I/xUCxbDMoEsm0 eKOQ== X-Gm-Message-State: ACrzQf1HdhDnRCDThurENqxS2xwlto9qjD/D5jfeWAR2H3bhR0qGotTe aEhyH5Td+ISCyfr3YRW5yZjUwA== X-Google-Smtp-Source: AMsMyM5qDiZHksOAuZYMVhNiQdSAwvp/e23ZUw8JtKFl+/EaFMbxa8GtIZawrtBdt1uSZPG5q1BKSg== X-Received: by 2002:a17:907:6da3:b0:783:5665:18dc with SMTP id sb35-20020a1709076da300b00783566518dcmr7823530ejc.173.1664573778546; Fri, 30 Sep 2022 14:36:18 -0700 (PDT) Received: from x220.qyliss.net (p54b8e692.dip0.t-ipconnect.de. [84.184.230.146]) by smtp.gmail.com with ESMTPSA id kv12-20020a17090778cc00b0074a82932e3bsm1729076ejc.77.2022.09.30.14.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 14:36:18 -0700 (PDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id E448656F; Fri, 30 Sep 2022 21:36:17 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [RFC PATCH v2 09/10] vm/app: add hello-wayland demo VM Date: Fri, 30 Sep 2022 21:35:32 +0000 Message-Id: <20220930213533.1710618-10-alyssa.ross@unikie.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220930213533.1710618-1-alyssa.ross@unikie.com> References: <20220930213533.1710618-1-alyssa.ross@unikie.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 3NHIKJHNA3UZ75PACS2B7GHHK43LQV7C X-Message-ID-Hash: 3NHIKJHNA3UZ75PACS2B7GHHK43LQV7C X-MailFrom: alyssa.ross@unikie.com X-Mailman-Rule-Hits: header-match-devel.spectrum-os.org-0 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1 CC: Puck Meerburg , Ville Ilvonen 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: hello-wayland is the simplest possible Wayland client. This VM is used to demonstrate Spectrum's new Wayland capabilities. Signed-off-by: Alyssa Ross --- host/initramfs/extfs.nix | 3 +++ vm/app/hello-wayland.nix | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 vm/app/hello-wayland.nix diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix index bfaaf17..3c4ac1c 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; }; in @@ -22,6 +23,8 @@ runCommand "ext.ext4" { chmod +w svc/data tar -C ${appvm-catgirl} -c data | tar -C svc -x chmod +w svc/data + tar -C ${appvm-hello-wayland} -c data | tar -C svc -x + chmod +w svc/data tar -C ${appvm-lynx} -c data | tar -C svc -x tar -cf ext.tar svc diff --git a/vm/app/hello-wayland.nix b/vm/app/hello-wayland.nix new file mode 100644 index 0000000..410220d --- /dev/null +++ b/vm/app/hello-wayland.nix @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2022 Unikie + +{ config ? import ../../../nix/eval-config.nix {} }: + +import ../../vm-lib/make-vm.nix { inherit config; } { + name = "appvm-hello-wayland"; + wayland = true; + run = config.pkgs.callPackage ( + { writeScript, hello-wayland, wayland-proxy-virtwl }: + writeScript "run-hello-wayland" '' + #!/bin/execlineb -P + if { modprobe virtio-gpu } + foreground { ln -ns /run/ext /run/opengl-driver } + foreground { mkdir /run/user } + foreground { + umask 077 + mkdir /run/user/0 + } + export XDG_RUNTIME_DIR /run/user/0 + ${wayland-proxy-virtwl}/bin/wayland-proxy-virtwl --virtio-gpu + ${hello-wayland}/bin/hello-wayland + '' + ) { }; +} -- 2.37.1