Skip to content

preflight: init at 1.1.0#522441

Open
Gigahawk wants to merge 1 commit into
NixOS:masterfrom
Gigahawk:preflight
Open

preflight: init at 1.1.0#522441
Gigahawk wants to merge 1 commit into
NixOS:masterfrom
Gigahawk:preflight

Conversation

@Gigahawk

@Gigahawk Gigahawk commented May 21, 2026

Copy link
Copy Markdown
Contributor

Things done

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels May 21, 2026
@Gigahawk Gigahawk force-pushed the preflight branch 2 times, most recently from 23720eb to 2d0530f Compare June 8, 2026 21:49
@Gigahawk Gigahawk changed the title [WIP] preflight: init at 1.0.0 preflight: init at 1.0.0 Jun 8, 2026
@Gigahawk Gigahawk marked this pull request as ready for review June 8, 2026 21:49
@nixpkgs-ci nixpkgs-ci Bot added the 8.has: package (new) This PR adds a new package label Jun 8, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Jun 8, 2026
@Gigahawk

Gigahawk commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 522441
Commit: 46f3f3870092edcab1526d36ae64db4e0a903eb7 (subsequent changes)
Merge: 68fc4fc2a35c4575a4ca1cfe1fffcc3439639732

Logs: https://github.com/Gigahawk/nixpkgs-review-gha/actions/runs/27170087500


x86_64-linux

✅ 1 package built:
  • preflight

aarch64-linux

✅ 1 package built:
  • preflight

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

@MohrJonas

Copy link
Copy Markdown

I just tried using preflight locally on my own machine. It starts up fine, but as soon as I attempt to open a file chooser, it crashes with the error
(preflight:208711): GLib-GIO-ERROR **: 20:04:59.680: No GSettings schemas are installed on the system.
I am on KDE with unstable nixpkgs.

@Gigahawk

Gigahawk commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

I get a similar issue too Settings schema 'org.gtk.Settings.FileChooser' is not installed, from some quick googling I imagine this is an issue with your system rather than an issue with this package.

Possibly related:

Regardless, looks like a new version got released yesterday so I will be rebuilding later today to see if anything has changed.

Edit: looks like the new release breaks some patches, will have to come back to this later

@nixpkgs-ci nixpkgs-ci Bot added the 8.has: package (update) This PR updates a package to a newer version label Jun 9, 2026
@Gigahawk

Gigahawk commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review-gha (04076f7)

Command: nixpkgs-review pr 522441
Commit: 509c6cc7e5d8377c29207fa9cecc54c5792c4b1e (subsequent changes)
Merge: 57da2b55702a6a8580683f1f1653791b9d7a035f

Logs: https://github.com/Gigahawk/nixpkgs-review-gha/actions/runs/27237040192


x86_64-linux

❌ 1 package failed to build:
  • preflight

aarch64-linux

❌ 1 package failed to build:
  • preflight

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

@MohrJonas

Copy link
Copy Markdown

Yeah I was able to reproduce the Settings schema 'org.gtk.Settings.FileChooser' is not installed as well by manually appending the gsettings directories from the nix-store to my XDG_DATA_DIRS.
It might also very well be the case that this is a problem in my nixos configuration, just wanted to let you know :D

@Gigahawk Gigahawk changed the title preflight: init at 1.0.0 preflight: init at 1.1.0 Jun 10, 2026
@Gigahawk

Copy link
Copy Markdown
Contributor Author

Build is working now again on 1.1.0, still the same issue with the file picker, going to build on top of #507455 and see if that fixes it

@nixpkgs-ci nixpkgs-ci Bot removed the 8.has: package (update) This PR updates a package to a newer version label Jun 10, 2026
@Gigahawk

Gigahawk commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I am pretty sure the issue has something to do with wrapGappsHook3 not applying to the preflight binary?

For example when inspecting the sfwbar binary I get

$ nix build .#sfwbar && cat result/bin/sfwbar | grep --text makeCWrapper
makeCWrapper '/nix/store/q4dw9izqnlllwkrmf0ri3smpdyaz71s3-sfwbar-1.0_beta17/bin/.sfwbar-wrapped' \
# (Use `nix-shell -p makeBinaryWrapper` to get access to makeCWrapper in your shell)

And indeed if you just inspect the cat output manually you will see the GTK stuff being set that presumably fixes the issue

# ------------------------------------------------------------------------------------
# The C-code for this binary wrapper has been generated using the following command:


makeCWrapper '/nix/store/q4dw9izqnlllwkrmf0ri3smpdyaz71s3-sfwbar-1.0_beta17/bin/.sfwbar-wrapped' \
    --inherit-argv0 \
    --prefix 'GIO_EXTRA_MODULES' ':' '/nix/store/i8dcswdbyy337aw266f922lbik0jy8g6-dconf-0.49.0-lib/lib/gio/modules' \
    --prefix 'GIO_EXTRA_MODULES' ':' '/nix/store/i8dcswdbyy337aw266f922lbik0jy8g6-dconf-0.49.0-lib/lib/gio/modules' \
    --set 'GDK_PIXBUF_MODULE_FILE' '/nix/store/91lgsf2dixa2mni74pvy3k6rxp2m32dr-librsvg-2.62.1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache' \
    --prefix 'XDG_DATA_DIRS' ':' '/nix/store/k8a44404day9i86sxkjm0gq5ymlvyh06-gsettings-desktop-schemas-50.1/share/gsettings-schemas/gsettings-desktop-schemas-50.1:/nix/store/v7fvwaf6j1hwvb9dmwfa97nzmrlshqai-gtk+3-3.24.52/share/gsettings-schemas/gtk+3-3.24.52:/nix/store/m2kqwy3rb25dy5zi5sjl4f6raryb67y9-pipewire-1.6.5/share/gsettings-schemas/pipewire-1.6.5' \
    --prefix 'XDG_DATA_DIRS' ':' '/nix/store/q4dw9izqnlllwkrmf0ri3smpdyaz71s3-sfwbar-1.0_beta17/share'


# (Use `nix-shell -p makeBinaryWrapper` to get access to makeCWrapper in your shell)
# ------------------------------------------------------------------------------------

But this note is not present in the preflight binary

$ nix build .#preflight && cat result/bin/preflight | grep --text makeCWrapper

Edit: In the build logs for sfwbar, there is a line specifically calling out the binary being wrapped as part of fixupPhase:

Running phase: gappsWrapperArgsHook
Running phase: dropIconThemeCache
Running phase: dropIconThemeCache
Running phase: dropIconThemeCache
Running phase: fixupPhase
Wrapping program '/nix/store/q4dw9izqnlllwkrmf0ri3smpdyaz71s3-sfwbar-1.0_beta17/bin/sfwbar'

This is missing from the preflight logs

Running phase: gappsWrapperArgsHook
Running phase: dropIconThemeCache
Running phase: dropIconThemeCache
Running phase: dropIconThemeCache
Running phase: fixupPhase
Symlinking parent icon themes...
separating debug info from /nix/store/kiq824bs1q8l946w4zfi041g779svldl-preflight-1.1.0/bin/preflight (build ID 026f96c2ac1df8f01821d
3460e15de34f25ac11c)
separate-debug-info: copying patched source files to /nix/store/3jhhsqljv3gfnsf1xskxslzf9ls2ccjn-preflight-1.1.0-debug/src/overlay..
.
/build /build/source/build
...

It seems to work fine on prusa-slicer for some reason, which this derivation is based on

Running phase: gappsWrapperArgsHook
Running phase: dropIconThemeCache
Running phase: dropIconThemeCache
Running phase: dropIconThemeCache
Running phase: fixupPhase
Symlinking parent icon themes...
Wrapping program '/nix/store/3z6zk3scc5nxac7hn3v50iawcia5ilfs-prusa-slicer-2.9.5/bin/prusa-slicer'
Not wrapping link: '/nix/store/3z6zk3scc5nxac7hn3v50iawcia5ilfs-prusa-slicer-2.9.5/bin/prusa-gcodeviewer' (already wrapped)

nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot requested a review from Ericson2314 June 10, 2026 11:12
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 10, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. label Jun 10, 2026
@hesiod

hesiod commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

I'm not quite why the PR requested a review from me.
Anyways, I'd suggest taking another look at the wrapGApps documentation, there's quite a few edge cases documented there.

@Gigahawk Gigahawk marked this pull request as draft June 10, 2026 18:24
@Gigahawk

Copy link
Copy Markdown
Contributor Author

I'm not quite why the PR requested a review from me. Anyways, I'd suggest taking another look at the wrapGApps documentation, there's quite a few edge cases documented there.

Apologies for the ping, moving it back to draft for now while I figure this out.

Is there something in the docs you're specifically referring to? Everything I've found including just reading wrap-gapps-hook.sh seems to indicate it should just apply to any executable in $out/bin but that is not happening.

@Gigahawk

Gigahawk commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

So after putting some log statements into wrap-gapps-hook.sh in 2213bec it seems like:

  1. the hook is run first on the debug output, which does nothing because there is nothing to wrap
  2. the hook is run again (presumably on the main output), which exits early because wrapGAppsHookHasRun has already been set

Trying to build again with separateDebugInfo disabled to see if that works.
All of the other prusa-slicer derivatives seem to work fine with this set though so I am not sure why this package is unique, nor do I really understand the issues with leaving this unset.

@nixpkgs-branch-check nixpkgs-branch-check Bot dismissed their stale review June 10, 2026 23:28

Review dismissed automatically

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. and removed 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jun 10, 2026
@Gigahawk

Copy link
Copy Markdown
Contributor Author

So I can confirm that with separateDebugInfo set to false wrapGAppsHook3 now works properly.

As for why this doesn't cause an issue for other prusa-slicer derivatives, it seems like the hook just happens to run on the non-debug outputs first? Not clear how this ordering happens.

@Gigahawk Gigahawk marked this pull request as ready for review June 11, 2026 00:23
@Gigahawk

Copy link
Copy Markdown
Contributor Author

Looks like the CI failure is just GitHub being flaky rather than an actual issue, I don't seem to have permissions to restart it without pushing a new commit though

@nixpkgs-review-gha

Copy link
Copy Markdown

nixpkgs-review result

Generated using nixpkgs-review-gha (d350d81)

Command: nixpkgs-review pr 522441
Commit: 7e7898c0578d4628e61995dbe3c95590b028d402 (subsequent changes)
Merge: 091e35844699e9191231abb3542b61604c18280b

Triggered by @Gigahawk (10356230)
Logs: https://github.com/Gigahawk/nixpkgs-review-gha/actions/runs/27319260990/attempts/1


x86_64-linux

✅ 1 package built:
  • preflight

aarch64-linux

✅ 1 package built:
  • preflight

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

@MohrJonas

Copy link
Copy Markdown

Just tried it again with the latest changes and can confirm that opening files now works as expected. Thanks for taking the time to get this right :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants