Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1--- a/gtk/deprecated/gtkrc.c 2016-04-02 18:43:08.401663112 +0900 2+++ b/gtk/deprecated/gtkrc.c 2016-04-02 18:29:19.927608592 +0900 3@@ -774,5 +774,23 @@ 4 if (var) 5 result = g_strdup (var); 6 7+ // check NIX_PROFILES paths. 8+ const gchar *nixProfilesEnv = g_getenv ("NIX_PROFILES"); 9+ gchar *cachePath; 10+ guint i; 11+ 12+ if(nixProfilesEnv && !result){ 13+ gchar **paths = g_strsplit(nixProfilesEnv, " ", -1); 14+ for (i = 0; paths[i] != NULL; i++){ 15+ cachePath = g_build_filename(paths[i], "etc", "gtk-3.0", "immodules.cache", NULL); 16+ if( g_file_test( cachePath, G_FILE_TEST_EXISTS) ){ 17+ if(result) g_free(result); 18+ result = g_strdup(cachePath); 19+ } 20+ g_free(cachePath); 21+ } 22+ g_strfreev(paths); 23+ } 24+ 25 if (!result) 26 { 27