From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Yureka Lilian <yureka@cyberchaos.dev>
Subject: [PATCH 3/3] host/rootfs: stop using pkgsStatic
Date: Thu, 27 Nov 2025 17:41:19 +0100 [thread overview]
Message-ID: <20251127164119.2037885-3-hi@alyssa.is> (raw)
In-Reply-To: <20251127164119.2037885-1-hi@alyssa.is>
For as long as we're running mesa on the host, we'll need dynamic
linking, so let's at least stick to a single package set.
Since we're longer cross compiling, I've switched to taking inkscape
and xorg from the default package set. They're only used for
building, not installed in the image, so let's avoid having to build
their large musl closures.
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
host/rootfs/default.nix | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix
index 2af6cbe..50e03a3 100644
--- a/host/rootfs/default.nix
+++ b/host/rootfs/default.nix
@@ -4,15 +4,17 @@
import ../../lib/call-package.nix (
{ callSpectrumPackage, spectrum-build-tools, src
-, pkgsMusl, pkgsStatic, linux_latest
+, pkgsMusl, linux_latest, inkscape, xorg
}:
-pkgsStatic.callPackage (
+pkgsMusl.callPackage (
{ spectrum-host-tools
, lib, stdenvNoCC, nixos, runCommand, writeClosure, erofs-utils, s6-rc
-, busybox, cloud-hypervisor, cryptsetup, dbus, execline, inkscape
-, iproute2, inotify-tools, jq, mdevd, s6, s6-linux-init, socat
-, util-linuxMinimal, virtiofsd, xorg, xdg-desktop-portal-spectrum-host
+, busybox, cloud-hypervisor, cosmic-files, crosvm, cryptsetup
+, dejavu_fonts, dbus, execline, foot, fuse3, iproute2, inotify-tools
+, jq, kmod, mdevd, mesa, s6, s6-linux-init, socat, systemd
+, util-linuxMinimal, virtiofsd, westonLite, xdg-desktop-portal
+, xdg-desktop-portal-gtk, xdg-desktop-portal-spectrum-host
}:
let
@@ -21,20 +23,19 @@ let
concatMapStringsSep concatStrings escapeShellArgs fileset mapAttrsToList
trivial;
- foot = pkgsMusl.foot.override { allowPgo = false; };
-
packages = [
- cloud-hypervisor cryptsetup dbus execline inotify-tools iproute2
- jq mdevd s6 s6-linux-init s6-rc socat spectrum-host-tools
- util-linuxMinimal virtiofsd xdg-desktop-portal-spectrum-host
+ cloud-hypervisor cosmic-files crosvm cryptsetup dbus execline
+ fuse3 inotify-tools iproute2 jq kmod mdevd s6 s6-linux-init s6-rc
+ socat spectrum-host-tools systemd util-linuxMinimal virtiofsd
+ xdg-desktop-portal-spectrum-host
+
+ (foot.override { allowPgo = false; })
(busybox.override {
# Use a separate file as it is a bit too big.
extraConfig = builtins.readFile ./busybox-config;
})
-
- # Take kmod from pkgsMusl since we use pkgsMusl.kmod.lib below anyway.
- ] ++ (with pkgsMusl; [ cosmic-files crosvm foot fuse3 kmod systemd ]);
+ ];
nixosAllHardware = nixos ({ modulesPath, ... }: {
imports = [ (modulesPath + "/profiles/all-hardware.nix") ];
@@ -54,8 +55,9 @@ let
# It doesn't get picked up from libsystemd-shared.so's RUNPATH due to
# https://inbox.vuxu.org/musl/20251017-dlopen-use-rpath-of-caller-dso-v1-1-46c69eda1473@iscas.ac.cn/
usrPackages = [
- appvm kernel.modules firmware netvm
- ] ++ (with pkgsMusl; [ dejavu_fonts kmod.lib mesa westonLite ]);
+ appvm dejavu_fonts kmod.lib mesa westonLite kernel.modules
+ firmware netvm
+ ];
appvms = {
appvm-firefox = callSpectrumPackage ../../vm/app/firefox.nix {};
@@ -79,16 +81,16 @@ let
# Weston doesn't support SVG icons.
inkscape -w 20 -h 20 \
-o $out/usr/share/icons/hicolor/20x20/apps/com.system76.CosmicFiles.png \
- ${pkgsMusl.cosmic-files}/share/icons/hicolor/24x24/apps/com.system76.CosmicFiles.svg
+ ${cosmic-files}/share/icons/hicolor/24x24/apps/com.system76.CosmicFiles.svg
ln -st $out/usr/bin \
${concatMapStringsSep " " (p: "${p}/bin/*") packages} \
- ${pkgsMusl.xdg-desktop-portal}/libexec/xdg-document-portal \
- ${pkgsMusl.xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk
+ ${xdg-desktop-portal}/libexec/xdg-document-portal \
+ ${xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk
ln -st $out/usr/share/dbus-1 \
${dbus}/share/dbus-1/session.conf
ln -st $out/usr/share/dbus-1/services \
- ${pkgsMusl.xdg-desktop-portal-gtk}/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service
+ ${xdg-desktop-portal-gtk}/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service
${concatStrings (mapAttrsToList (name: path: ''
ln -s ${path} $out/usr/lib/spectrum/vm/${name}
--
2.51.0
next prev parent reply other threads:[~2025-11-27 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 16:41 [PATCH 1/3] host/rootfs: get rid of pkgsGui Alyssa Ross
2025-11-27 16:41 ` [PATCH 2/3] pkgs: pkgsMusl: fix splicing Alyssa Ross
2025-11-27 16:41 ` Alyssa Ross [this message]
2025-11-28 10:43 ` [PATCH 3/3] host/rootfs: stop using pkgsStatic Alyssa Ross
2025-11-28 10:43 ` [PATCH 1/3] host/rootfs: get rid of pkgsGui Alyssa Ross
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=20251127164119.2037885-3-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
--cc=yureka@cyberchaos.dev \
/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).