You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.)
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.
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!
Activity
CMCDragonkai commentedon Mar 4, 2018
I'd like to know as well. Currently receiving this error:
On one of the packages I'm trying to put into nixpkgs.
Apparently sometimes you need
gnome3.defaultIconThemefor buildInputs.So apparently all you need to do to use this is:
jtojnar commentedon Mar 4, 2018
The error occurs when you do not have any directory containing
glib-2.0/schemas/gschemas.compiledinXDG_DATA_DIRSvariable. One of the thingswrapGAppsHookdoes is addingshare/gsettings-schemas/$name(which usually contains the aforementioned file) of dependencies toXDG_DATA_DIRS. (Actually this happens in cooperation with glib setup hook via$GSETTINGS_SCHEMAS_PATHvariable.)Icon themes work in the same vein, only
XDG_ICON_DIRSvariable is used and it is populated byhicolor-icon-theme’s setup hook which is propagated tognome3.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.tbenst commentedon May 27, 2019
Just thought I'd leave this comment here for future reference: if you get an error like
ValueError: Namespace Gtk not availablefor python gtk applications, try addingwrapGAppsHookto propogatedBuildInputs!jtojnar commentedon May 27, 2019
@tbenst It should go to
nativeBuildInputs, though. But be wary of #5694327 remaining items
Paraver: Use wrapGApps Hook for nixos