ssb-patchwork: fix GTK file selection dialog#83410
Conversation
|
Works like a charm! ❤️ |
| symlinkJoin { | ||
| inherit name; | ||
| paths = [ binary ]; | ||
| in stdenvNoCC.mkDerivation { |
There was a problem hiding this comment.
I don't really get why we have to use the NoCC version here? It has little benefit.
| nativeBuildInputs = [ wrapGAppsHook ]; | ||
|
|
||
| buildCommand = '' | ||
| makeWrapper "${binary}/bin/ssb-patchwork" "$out/bin/ssb-patchwork" \ | ||
| --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ | ||
| --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}" \ |
There was a problem hiding this comment.
this is an improper use of wrapGAppsHook.
Please read https://nixos.org/nixpkgs/manual/#ssec-gnome-hooks, it exists so you don't have to do this.
It also should automatically wrap everything at $out/bin. If you make a symlink here for ${binary}/bin/ssb-patchwork $out/bin/ssb-patchwork you shouldn't have to do anything.
There was a problem hiding this comment.
I would prefer an automatic solution but it doesn't work here.
There was a problem hiding this comment.
Could you explain why? If you can't you can just use the makeWrapper with the arguments wrapGAppsHook collects "${gappsWrapperArgs[@]}".
|
We could probably backport this bugfix to 20.03 |
Gsettings-schemas are relocated in |
I have little knowledge about how gsettings is supposed to work, and what this gschema.compiled is. It seems like a version of gschemas.compiled is installed, but buildFHSUserEnv might not set XDG_DATA_DIRS at all. If it's supposed to, you can try adding to nixpkgs/pkgs/build-support/appimage/default.nix Lines 25 to 32 in afb035a |
wrapGAppsHook will add the gsettings-schemas directories to XDG_DATA_DIRS via the glib setup-hook https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/glib/setup-hook.sh#L2. |
|
But didn't this PR state that simply adding |
wrapGAppsHook being added also just automatically wraps. Maybe manual wrapping is needed, but you still need wrapGAppsHook to collect |
|
Stupid question from a GTK noob here: why do we need to wrap the binary
to add these schema in the first place?
The appimageTools.wrapType2 function we're using in this package is in
charge of creating an FHS env containing among other things GTK3.
Ain't this FHS environment supposed to provide the
${gtk3}/share/gsettings-schemas/* schemas? Why are we missing them there?
Is there a particular reason why we rather should wrap this particular
binary instead of adding these schemas directly in the
appimageTools.wrapType2 function, thus making sure we won't end up
facing the same issue in other appImage bindists?
|
As I've said, in nixos we have a setup-hook that relocates all settings schemas to |
|
I just realized I forgot the obvious in my previous message: thanks a
lot ehmry!
This particular bug has been a personal pain for a while. My current
workaround was to fire up patchwork from my shell environment, which was
fixing this problem for a reason I failed to identify.
Anyways, kudos!
|
|
While this patch may fix Patchwork in the short-time, I'm closing the PR in favor of the general fix, #83705. |
Motivation for this change
Fix a bug with file selection dialogs.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)ping @asymmetric