Nix flake: zenity on the app's PATH, for file dialogs without a portal (#2177) (#5183)

rfd opens file dialogs through the XDG desktop portal and falls back to zenity
when there is none. The flake's package didn't bring zenity, so on a system
without a portal or zenity, Open and Save showed nothing. The wrapper now adds
nixpkgs' zenity at the end of PATH, after the system's own.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dudedagger42andClaude Opus 5.5 authored and GitHub committed 2026-11-04 06:53:37 +00:00
1 parent 69f202f1c8
commit 0231eec4c6
1 file changed
+4 -1
+4 -1
View File
@@ -148,10 +148,13 @@
'';
# Linux only: the app reaches the window through dlopen'd libraries, so the packaged
# binary needs the same LD_LIBRARY_PATH the shell exports. macOS needs no wrapper.
# binary needs the same LD_LIBRARY_PATH the shell exports. File dialogs go through the
# desktop portal and fall back to zenity without one (#2177), so zenity comes along,
# after the system's own on PATH. macOS needs no wrapper.
postFixup = pkgs.lib.optionalString pkgs.stdenv.isLinux ''
wrapProgram $out/bin/solidcraft \
--prefix LD_LIBRARY_PATH : "${libraryPath pkgs}" \
--suffix PATH : "${pkgs.lib.makeBinPath [ pkgs.zenity ]}" \
--set-default XDG_DATA_DIRS /usr/local/share:/usr/share \
--prefix XDG_DATA_DIRS : "$out/share:${driverShareDir pkgs}"
'';