Skip to content

Document wrapGAppsHook #16285

Closed
Closed

Description

@bennofs

I just found out about wrapGAppsHook by examining a gnome package, but there really should be documentation about this in the Nixpkgs User Guide (a section about Gnome would be nice, which would show the right way to package GTK3 / GTK2 glib based apps).

Also, perhaps there are other things I missed that one should know when packaging Gnome Applications or GTK3/2 apps?

/cc @lethalman @jgeerds @DamienCassou Gnome maintainers

Activity

  1. added
    0.kind: enhancement
    6.topic: GNOME
    9.needs: documentation
    on Jun 17, 2016
  2. self-assigned this
    on Nov 25, 2017
  3. CMCDragonkai commented on Mar 4, 2018

    @CMCDragonkai
    Member

    I'd like to know as well. Currently receiving this error:

    (gpredict:7844): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
    

    On one of the packages I'm trying to put into nixpkgs.

    Apparently sometimes you need gnome3.defaultIconTheme for buildInputs.

    So apparently all you need to do to use this is:

    nativeBuildInputs = [ wrapGAppsHook ];
    
  4. jtojnar commented on Mar 4, 2018

    @jtojnar
    Member

    The error occurs when you do not have any directory containing glib-2.0/schemas/gschemas.compiled in XDG_DATA_DIRS variable. One of the things wrapGAppsHook does is adding share/gsettings-schemas/$name (which usually contains the aforementioned file) of dependencies to XDG_DATA_DIRS. (Actually this happens in cooperation with glib setup hook via $GSETTINGS_SCHEMAS_PATH variable.)

    Icon themes work in the same vein, only XDG_ICON_DIRS variable is used and it is populated by hicolor-icon-theme’s setup hook which is propagated to gnome3.defaultIconTheme (adwaita-icon-theme).

    hicolor-icon-theme (XDG fallback theme) should be probably added to any GTK application that uses icons (I think that is every GTK applicaton nowadays due to CSD) but some applications require Adwaita because they use icons not in hicolor. Not sure if this functions correctly though, at least it should not according to my mental model of how icon theme selection works; I will need to read the relevant XDG spec before I can finish the documentation.

  5. tbenst commented on May 27, 2019

    @tbenst
    Contributor

    Just thought I'd leave this comment here for future reference: if you get an error like ValueError: Namespace Gtk not available for python gtk applications, try adding wrapGAppsHook to propogatedBuildInputs!

  6. jtojnar commented on May 27, 2019

    @jtojnar
    Member

    @tbenst It should go to nativeBuildInputs, though. But be wary of #56943

  7. 27 remaining items

  8. added a commit that references this issue on Mar 14, 2024
  9. moved this to Done in GNOMEon Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

0.kind: enhancement6.topic: GNOME9.needs: documentation

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions