From b3d77bb310ad1ed2a1ce23bf2cf77dc39307dc67 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 30 Apr 2026 02:16:40 -0700 Subject: [PATCH] quickshell: build caelestia with clang --- nixos/quickshell.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nixos/quickshell.nix b/nixos/quickshell.nix index b9eeaf8b..8546625c 100644 --- a/nixos/quickshell.nix +++ b/nixos/quickshell.nix @@ -6,9 +6,35 @@ makeEnable config "myModules.quickshell" false { let hyprlandEnabled = lib.attrByPath ["myModules" "hyprland" "enable"] false nixos.config; system = pkgs.stdenv.hostPlatform.system; + quickshellBase = inputs.caelestia-shell.inputs.quickshell.packages.${system}.default.override { + # GCC 15.2 ICEs on generated NetworkManager DBus sources in + # quickshell 0.2.1. Quickshell's own dev shell uses clangStdenv. + stdenv = pkgs.clangStdenv; + withX11 = false; + withI3 = false; + }; + quickshellUnwrapped = quickshellBase.unwrapped.overrideAttrs (old: { + # Clang then needs PCH disabled because quickshell's PipeWire target + # adds compile flags that do not match the shared PCH target. + cmakeFlags = (old.cmakeFlags or []) ++ [ (lib.cmakeBool "NO_PCH" true) ]; + }); + quickshellPackage = quickshellUnwrapped.stdenv.mkDerivation { + inherit (quickshellUnwrapped) version meta buildInputs; + pname = "${quickshellUnwrapped.pname}-wrapped"; + nativeBuildInputs = quickshellUnwrapped.nativeBuildInputs ++ [ pkgs.qt6.wrapQtAppsHook ]; + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + installPhase = '' + mkdir -p $out + cp -r ${quickshellUnwrapped}/* $out + ''; + passthru.unwrapped = quickshellUnwrapped; + }; caelestiaPackage = inputs.caelestia-shell.packages.${system}.with-cli.override { # Caelestia pins app2unit 1.0.3, which no longer builds on this nixpkgs snapshot. app2unit = pkgs.app2unit; + quickshell = quickshellPackage; }; in {