nix: only add shellhook on linux

pull/1104/head
Mitchell Hashimoto 2023-12-16 14:14:53 -08:00
parent 212a95866a
commit d796d1259b
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 3 additions and 1 deletions

View File

@ -145,7 +145,9 @@ in
# it to be "portable" across the system. # it to be "portable" across the system.
LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs;
shellHook = '' # On Linux we need to setup the environment so that all GTK data
# is available (namely icons).
shellHook = lib.optionalString stdenv.isLinux ''
# Minimal subset of env set by wrapGAppsHook4 for icons and global settings # 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:${hicolor-icon-theme}/share:${gnome.adwaita-icon-theme}/share
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH # from glib setup hook export XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH # from glib setup hook