From bc40eefa3a3c196704201efaf0e4506f82dd86ec Mon Sep 17 00:00:00 2001 From: Eric Culp Date: Thu, 26 Feb 2026 13:45:59 -0700 Subject: [PATCH] tlaplus-toolbox: fix crash when opening file dialog This is re-applying the fix from https://github.com/NixOS/nixpkgs/pull/129042, which I think was accidentally partially reverted in https://github.com/NixOS/nixpkgs/pull/441183. In particular, the application can't find gsettings schemas to open the file dialog and prints this error message: No GSettings schemas are installed on the system The search paths for these schemas is normally set up by gappsWrapperArgsHook in a preFixupPhase, but this package creates the wrapper in the installPhase, so gappsWrapperArgs isn't fully initialized yet. I believe this hook normally runs after install so the glib postInstall hook can also detect schemas in $out, but this package doesn't have any. It's sufficient to just call gappsWrapperArgsHook and not call fixupPhase like in the original PR. gappsWrapperArgsHook is one of the preFixupPhases, not part of preFixup, so calling fixupPhase won't run it. --- pkgs/by-name/tl/tlaplus-toolbox/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/tl/tlaplus-toolbox/package.nix b/pkgs/by-name/tl/tlaplus-toolbox/package.nix index 91c37dbb1f8a..a2b6303402c3 100644 --- a/pkgs/by-name/tl/tlaplus-toolbox/package.nix +++ b/pkgs/by-name/tl/tlaplus-toolbox/package.nix @@ -60,6 +60,9 @@ stdenv.mkDerivation (finalAttrs: { patchelf --set-interpreter ${bintools.dynamicLinker} \ "$(find "$out/libexec/toolbox" -name jspawnhelper)" + # Populate gappsWrapperArgs now instead of in a preFixupPhase. + gappsWrapperArgsHook + makeShellWrapper $out/libexec/toolbox/toolbox $out/bin/tla-toolbox \ --chdir "$out/libexec/toolbox" \ --add-flags "-data ~/.tla-toolbox" \