patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH 1/3] host/rootfs: get rid of pkgsGui
@ 2025-11-27 16:41 Alyssa Ross
  2025-11-27 16:41 ` [PATCH 2/3] pkgs: pkgsMusl: fix splicing Alyssa Ross
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alyssa Ross @ 2025-11-27 16:41 UTC (permalink / raw)
  To: devel; +Cc: Yureka Lilian

The original purpose of pkgsGui was to have a dynamically linked
package set that used libudev-zero.  Now we don't use libudev-zero on
the host, so it's no longer necessary.  The one remaining override can
be moved into the overlay until it's upstreamed[1].

Link: https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/162 [1]
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
 host/rootfs/default.nix | 31 +++++++++++--------------------
 pkgs/overlay.nix        |  6 ++++++
 2 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix
index f7974a4..2af6cbe 100644
--- a/host/rootfs/default.nix
+++ b/host/rootfs/default.nix
@@ -18,19 +18,10 @@ pkgsStatic.callPackage (
 let
   inherit (nixosAllHardware.config.hardware) firmware;
   inherit (lib)
-    concatMapStringsSep concatStrings escapeShellArgs fileset optionalAttrs
-    mapAttrsToList systems trivial;
+    concatMapStringsSep concatStrings escapeShellArgs fileset mapAttrsToList
+    trivial;
 
-  pkgsGui = pkgsMusl.extend (
-    _: super:
-    (optionalAttrs (systems.equals pkgsMusl.stdenv.hostPlatform super.stdenv.hostPlatform) {
-      flatpak = super.flatpak.override {
-        withMalcontent = false;
-      };
-    })
-  );
-
-  foot = pkgsGui.foot.override { allowPgo = false; };
+  foot = pkgsMusl.foot.override { allowPgo = false; };
 
   packages = [
     cloud-hypervisor cryptsetup dbus execline inotify-tools iproute2
@@ -42,8 +33,8 @@ let
       extraConfig = builtins.readFile ./busybox-config;
     })
 
-  # Take kmod from pkgsGui since we use pkgsGui.kmod.lib below anyway.
-  ] ++ (with pkgsGui; [ cosmic-files crosvm foot fuse3 kmod systemd ]);
+  # 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") ];
@@ -64,7 +55,7 @@ let
   # 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 pkgsGui; [ dejavu_fonts kmod.lib mesa westonLite ]);
+  ] ++ (with pkgsMusl; [ dejavu_fonts kmod.lib mesa westonLite ]);
 
   appvms = {
     appvm-firefox = callSpectrumPackage ../../vm/app/firefox.nix {};
@@ -88,16 +79,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 \
-        ${pkgsGui.cosmic-files}/share/icons/hicolor/24x24/apps/com.system76.CosmicFiles.svg
+        ${pkgsMusl.cosmic-files}/share/icons/hicolor/24x24/apps/com.system76.CosmicFiles.svg
 
     ln -st $out/usr/bin \
         ${concatMapStringsSep " " (p: "${p}/bin/*") packages} \
-        ${pkgsGui.xdg-desktop-portal}/libexec/xdg-document-portal \
-        ${pkgsGui.xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk
+        ${pkgsMusl.xdg-desktop-portal}/libexec/xdg-document-portal \
+        ${pkgsMusl.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 \
-        ${pkgsGui.xdg-desktop-portal-gtk}/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service
+        ${pkgsMusl.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}
@@ -138,7 +129,7 @@ stdenvNoCC.mkDerivation {
   dontFixup = true;
 
   passthru = {
-    inherit appvm firmware kernel nixosAllHardware packagesSysroot pkgsGui;
+    inherit appvm firmware kernel nixosAllHardware packagesSysroot;
   };
 
   meta = with lib; {
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index 0ca196c..fdddae0 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -4,5 +4,11 @@
 (final: super: {
   cloud-hypervisor = import ./cloud-hypervisor { inherit final super; };
 
+  flatpak = super.flatpak.override (
+    final.lib.optionalAttrs final.stdenv.hostPlatform.isMusl {
+      withMalcontent = false;
+    }
+  );
+
   skawarePackages = import ./skaware-packages { inherit final super; };
 })

base-commit: c43e5c63a028994d5f66a15db19f415bf3cb7736
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-28 10:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 3/3] host/rootfs: stop using pkgsStatic Alyssa Ross
2025-11-28 10:43   ` Alyssa Ross
2025-11-28 10:43 ` [PATCH 1/3] host/rootfs: get rid of pkgsGui Alyssa Ross

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).