From 212a95866aa222c3b260743d16e0d73a543e542a Mon Sep 17 00:00:00 2001 From: Denys Pavlov Date: Sat, 16 Dec 2023 13:05:42 -0500 Subject: [PATCH] nix: fix GTK icons for debug builds Set `XDG_DATA_DIRS` in `nix develop` shell to include default Gnome icon sets and gsettings schemas. Sourced from [nixos wiki](https://nixos.wiki/wiki/Development_environment_with_nix-shell#No_GSettings_schemas_are_installed_on_the_system). --- nix/devShell.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nix/devShell.nix b/nix/devShell.nix index 1c03c6a6c..a9c264aa8 100644 --- a/nix/devShell.nix +++ b/nix/devShell.nix @@ -31,6 +31,8 @@ glib, gtk4, libadwaita, + gnome, + hicolor-icon-theme, harfbuzz, libpng, libGL, @@ -142,4 +144,10 @@ in # This should be set onto the rpath of the ghostty binary if you want # it to be "portable" across the system. LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; + + shellHook = '' + # Minimal subset of env set by wrapGAppsHook4 for icons and global settings + export XDG_DATA_DIRS=$XDG_DATA_DIRS:${hicolor-icon-theme}/share:${gnome.adwaita-icon-theme}/share + export XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH # from glib setup hook + ''; }