From 22f70547f622255bdb35dedfc82d3cbc9f5b219d Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 12 Sep 2019 15:07:39 +0200 Subject: nixos/doc/gnome: clarify icon theme availability --- doc/languages-frameworks/gnome.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml index 8b3151d5bf9..05bfa4fe0ce 100644 --- a/doc/languages-frameworks/gnome.xml +++ b/doc/languages-frameworks/gnome.xml @@ -32,7 +32,7 @@ Icons - When an application uses icons, an icon theme should be available in XDG_DATA_DIRS. The package for the default, icon-less hicolor-icon-theme contains a setup hook that will pick up icon themes from buildInputs and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed. + When an application uses icons, an icon theme should be available in XDG_DATA_DIRS during runtime. The package for the default, icon-less hicolor-icon-theme (should be propagated by every icon theme) contains a setup hook that will pick up icon themes from buildInputs and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed. -- cgit 1.4.1 From 9559a4fe08897eebdfeca24af8c67b8abbff712d Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 19 Sep 2019 01:35:12 +0200 Subject: doc/gnome: describe icon-theme.cache --- doc/languages-frameworks/gnome.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml index 05bfa4fe0ce..3d69d77a1c8 100644 --- a/doc/languages-frameworks/gnome.xml +++ b/doc/languages-frameworks/gnome.xml @@ -34,6 +34,10 @@ When an application uses icons, an icon theme should be available in XDG_DATA_DIRS during runtime. The package for the default, icon-less hicolor-icon-theme (should be propagated by every icon theme) contains a setup hook that will pick up icon themes from buildInputs and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed. + + + To avoid costly file system access when locating icons, GTK, as well as Qt, can rely on icon-theme.cache files from the themes’ top-level directories. These files are generated using gtk-update-icon-cache, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into hicolor theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, gtk3 provides a setup hook that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using option if your desktop environment does not already do that. +
@@ -91,6 +95,11 @@ preFixup = '' glib setup hook will populate GSETTINGS_SCHEMAS_PATH and then wrapGAppsHook will prepend it to XDG_DATA_DIRS. + + + One of gtk3’s setup hooks will remove icon-theme.cache files from package’s icon theme directories to avoid conflicts. Icon theme packages should prevent this with dontDropIconThemeCache = true;. + + gnome3.dconf.lib is a dependency of wrapGAppsHook, which then also adds it to the GIO_EXTRA_MODULES variable. -- cgit 1.4.1