[PATCH v4 1/5] tools: rename guestSupport -> appSupport

Yureka Lilian
2025-09-23T13:20:36Z

---
img/app/default.nix | 4 ++--
pkgs/default.nix | 4 ++--
release/checks/pkg-tests.nix | 2 +-
tools/default.nix | 10 +++++-----
tools/meson.build | 2 +-
tools/meson_options.txt | 4 ++--
tools/shell.nix | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/img/app/default.nix b/img/app/default.nix
index f794836..bb8caf2 100644
--- a/img/app/default.nix
+++ b/img/app/default.nix
@@ -8,7 +8,7 @@ pkgsStatic.callPackage (
{ lib, stdenvNoCC, runCommand, writeClosure
, erofs-utils, jq, s6-rc, util-linux
, busybox, cacert, dejavu_fonts, execline, kmod, linux_latest, mdevd, s6
-, s6-linux-init, spectrum-guest-tools
+, s6-linux-init, spectrum-app-tools
}:

let
@@ -73,7 +73,7 @@ let
s6
s6-linux-init
s6-rc
- spectrum-guest-tools
+ spectrum-app-tools
terminfo

# Some packages can't (currently?) be built statically.
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 3b81339..2472218 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -37,9 +37,9 @@ let

lseek = self.callSpectrumPackage ../tools/lseek {};
rootfs = self.callSpectrumPackage ../host/rootfs {};
- spectrum-guest-tools = self.callSpectrumPackage ../tools {};
+ spectrum-app-tools = self.callSpectrumPackage ../tools {};
spectrum-host-tools = self.callSpectrumPackage ../tools {
- guestSupport = false;
+ appSupport = false;
hostSupport = true;
};
xdg-desktop-portal-spectrum-host =
diff --git a/release/checks/pkg-tests.nix b/release/checks/pkg-tests.nix
index a4f9a33..d7be42b 100644
--- a/release/checks/pkg-tests.nix
+++ b/release/checks/pkg-tests.nix
@@ -12,7 +12,7 @@ import ../../lib/call-package.nix (
integration = lib.recurseIntoAttrs (callSpectrumPackage ./integration {}).tests;

tools = lib.recurseIntoAttrs (callSpectrumPackage ../../tools {
- guestSupport = true;
+ appSupport = true;
hostSupport = true;
}).tests;
}) (_: {})
diff --git a/tools/default.nix b/tools/default.nix
index 95d76a1..201afae 100644
--- a/tools/default.nix
+++ b/tools/default.nix
@@ -6,7 +6,7 @@ import ../lib/call-package.nix (
, meson, ninja, pkg-config, rustc
, clang-tools, clippy
, dbus
-, guestSupport ? true
+, appSupport ? true
, hostSupport ? false
}:

@@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
fileset = lib.fileset.intersection src (lib.fileset.unions ([
./meson.build
./meson_options.txt
- ] ++ lib.optionals guestSupport [
+ ] ++ lib.optionals appSupport [
./xdg-desktop-portal-spectrum
] ++ lib.optionals hostSupport [
./lsvm
@@ -76,9 +76,9 @@ stdenv.mkDerivation (finalAttrs: {

depsBuildBuild = lib.optionals hostSupport [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ meson ninja ]
- ++ lib.optionals guestSupport [ pkg-config ]
+ ++ lib.optionals appSupport [ pkg-config ]
++ lib.optionals hostSupport [ rustc ];
- buildInputs = lib.optionals guestSupport [ dbus ];
+ buildInputs = lib.optionals appSupport [ dbus ];

postPatch = lib.optionals hostSupport (lib.concatMapStringsSep "\n" (crate: ''
mkdir -p subprojects/packagecache
@@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: {
'') packageCache);

mesonFlags = [
- (lib.mesonBool "guest" guestSupport)
+ (lib.mesonBool "app" appSupport)
(lib.mesonBool "host" hostSupport)
"-Dhostfsrootdir=/run/virtiofs/virtiofs0"
"-Dtests=false"
diff --git a/tools/meson.build b/tools/meson.build
index 9cebd03..e8b0cf2 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -23,6 +23,6 @@ if get_option('host')
subdir('start-vmm')
endif

-if get_option('guest')
+if get_option('app')
subdir('xdg-desktop-portal-spectrum')
endif
diff --git a/tools/meson_options.txt b/tools/meson_options.txt
index 4af0031..75ef1ec 100644
--- a/tools/meson_options.txt
+++ b/tools/meson_options.txt
@@ -4,8 +4,8 @@
option('host', type : 'boolean', value : false,
description : 'Build tools for the Spectrum host')

-option('guest', type : 'boolean',
- description : 'Build tools for Spectrum guests')
+option('app', type : 'boolean',
+ description : 'Build tools for Spectrum App VMs')

option('hostfsrootdir', type : 'string', value : '/run/host',
description : 'Path where the virtio-fs provided by the host will be mounted')
diff --git a/tools/shell.nix b/tools/shell.nix
index 701c1a9..1cf62bc 100644
--- a/tools/shell.nix
+++ b/tools/shell.nix
@@ -4,7 +4,7 @@
import ../lib/call-package.nix ({ callSpectrumPackage, clang-tools, clippy, rustfmt }:

(callSpectrumPackage ./. {
- guestSupport = true;
+ appSupport = true;
hostSupport = true;
}).overrideAttrs ({ hardeningDisable ? [], nativeBuildInputs ? [], ... }: {
# Not compatible with Meson's default -O0.
--
2.51.0