From 26b5f429f222c000dd07fb2670adc4eaa1d5fc64 Mon Sep 17 00:00:00 2001 From: Pigbuy Date: Sat, 20 Jun 2026 05:21:30 +0200 Subject: [PATCH] flake.nix: fix missing shell payload and kirigami QML imports Three fixes for the Nix package: 1. Copy root-level QML entry points (shell.qml, settings.qml, etc.) into the runtime payload - they weren't listed in sdata/runtime-root-files.txt or runtime-payload-dirs.txt. 2. Use the unwrapped kirigami for QML_IMPORT_PATH instead of kirigami-wrapped, which ships no QML files. 3. Hide .py files from patchShebangs in fixupPhase by removing execute bits in preFixup and restoring them in postFixup. --- flake.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 89358ecc8..b2405e748 100644 --- a/flake.nix +++ b/flake.nix @@ -110,7 +110,10 @@ ++ optionalQt6 pkgs "qtwayland"; qmlDeps = pkgs: - optionalKde pkgs "kirigami" + # kirigami-wrapped ships no QML files, use the unwrapped version + (lib.optional + (builtins.hasAttr "kdePackages" pkgs && builtins.hasAttr "kirigami" pkgs.kdePackages) + pkgs.kdePackages.kirigami.passthru.unwrapped) ++ optionalKde pkgs "syntax-highlighting" ++ optionalQt6 pkgs "qt5compat" ++ optionalQt6 pkgs "qtdeclarative" @@ -131,6 +134,16 @@ nativeBuildInputs = [ pkgs.makeWrapper ]; + # Prevent patchShebangs from attempting to rewrite Python scripts; + # non-executable files are skipped during fixupPhase. + preFixup = '' + find "$out/share/quickshell/inir" -type f -name '*.py' -exec chmod -x {} + + ''; + + postFixup = '' + find "$out/share/quickshell/inir" -type f -name '*.py' -exec chmod +x {} + + ''; + installPhase = let deps = runtimeDeps pkgs; @@ -152,6 +165,13 @@ cp -R "$dir" "$runtime/$dir" done < sdata/runtime-payload-dirs.txt + # Copy root-level QML entry points (shell.qml, settings.qml, etc.) + # which aren't listed in runtime-root-files.txt. + for f in *.qml; do + [ -f "$f" ] || continue + install -Dm644 "$f" "$runtime/$f" + done + chmod +x "$runtime/setup" "$runtime/scripts/inir" find "$runtime/scripts" -type f \( -name '*.sh' -o -name '*.fish' -o -name '*.py' \) -exec chmod +x {} \;