Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trilium: fix missing GSettings schemas #55449

Merged
merged 1 commit into from
Feb 9, 2019

Conversation

emmanuelrosa
Copy link
Contributor

@emmanuelrosa emmanuelrosa commented Feb 8, 2019

Motivation for this change

When launching Trilium via the .desktop file, such as by using rofi, a segfault occurs when attempting to add an image. To be more specific, when Trilium attempts to create a file chooser, it segfaults with the error: No GSettings schemas are installed on the system

This error does not occur when Trilium is launched from a terminal, such as termite.

This change adds the GNOME and GTK gsettings schemas to the XDG_DATA_DIRS to avoid the aforementioned segfault.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • [ ] macOS
    • other Linux distributions (though .desktop file doesn't apply to other distros)
  • [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
    BEFORE: 613792592
    AFTER: 618009088
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg requested a review from dtzWill February 8, 2019 15:16
@GrahamcOfBorg GrahamcOfBorg added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Feb 8, 2019
Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have wrapGAppsHook for this.

To use it simply:

  1. add it as a nativeBuildInputs
  2. add gtk3 and the like to buildInputs so they're in the env

Though since we're already wrapping in preFixup it will result in two wrappers.
So what you can do to eliminate that is:

preFixup = ''
  gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${atomEnv.libPath})
'';

@Mic92 Mic92 merged commit 5211cb0 into NixOS:master Feb 9, 2019
@emmanuelrosa emmanuelrosa deleted the trilium-gsettings branch February 9, 2019 14:46
@emmanuelrosa
Copy link
Contributor Author

Thank you @worldofpeace for telling me about, and explaining, wrapGAppsHook

@worldofpeace
Copy link
Contributor

@emmanuelrosa You're welcome 😄

We have some WIP docs at #43150 if you're up to reading that as well.

@dtzWill
Copy link
Member

dtzWill commented Feb 12, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants