Skip to content

flake.nix: fix missing shell payload and kirigami QML imports - #186

Open
Pigbuy wants to merge 1 commit into
snowarch:mainfrom
Pigbuy:fix/nix-flake-missing-payload
Open

flake.nix: fix missing shell payload and kirigami QML imports#186
Pigbuy wants to merge 1 commit into
snowarch:mainfrom
Pigbuy:fix/nix-flake-missing-payload

Conversation

@Pigbuy

@Pigbuy Pigbuy commented Jun 20, 2026

Copy link
Copy Markdown

Changes

Three fixes for the Nix package derivation so it works out of the box on NixOS:

1. Root-level QML files not copied to payload

The installPhase only copied files from sdata/runtime-root-files.txt and directories from sdata/runtime-payload-dirs.txt. Root QML entry points like shell.qml, settings.qml, etc. were left behind. The makeWrapper sets INIR_SYSTEM_RUNTIME_DIR to $out/share/quickshell/inir, but shell.qml wasn't there, so inir run errored with "Could not find an iNiR shell payload".

Fix: Added a glob loop in installPhase to copy all *.qml files from the source root into the runtime directory.

2. kirigami-wrapped has no QML files

The qmlDeps function used optionalKde pkgs "kirigami", which on nixpkgs >=25.05 resolves to kirigami-wrapped — a wrapper package with an empty lib/qt-6/qml/ directory. The actual org.kde.kirigami QML module lives in the unwrapped kirigami package (passthru.unwrapped).

Fix: In qmlDeps, access pkgs.kdePackages.kirigami.passthru.unwrapped directly instead.

3. patchShebangs can mangle Python scripts

During fixupPhase, patchShebangs processes all executable files. Python scripts with #!/usr/bin/env python3 get rewritten.

Fix: Standard Nixpkgs pattern — preFixup removes execute bits from .py files so patchShebangs skips them, postFixup restores them.

Yes I used AI for this but it works so better than nothing

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.
@snowarch snowarch moved this from Todo to Review in iNiR thing Jun 24, 2026
@snowarch

Copy link
Copy Markdown
Owner

Thanks @Pigbuy — accepted, and a clear writeup. Cherry-picked into prerelease; all three Nix fixes (root *.qml into the payload, unwrapped kirigami, the patchShebangs guard) ship to main next release.

snowarch pushed a commit that referenced this pull request Jul 16, 2026
Copy root *.qml into the Nix payload, use kirigami.passthru.unwrapped (wrapped
ships no QML), and guard patchShebangs from mangling Python scripts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

2 participants