diff options
author | Eric Sagnes <eric.sagnes@gmail.com> | 2016-04-04 18:06:48 +0900 |
---|---|---|
committer | Eric Sagnes <eric.sagnes@gmail.com> | 2016-04-16 17:51:32 +0900 |
commit | 77c413926230eb4fda6be41f666f5603129bbf73 (patch) | |
tree | e1414c11fa7e0e8d4c860c7b49902e3ba1dede00 /pkgs/development/libraries/gtk+/3.0-immodules.cache.patch | |
parent | ab428dce14f3dacd61e073eba14a9a9c9fcdde03 (diff) | |
download | nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.tar nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.tar.gz nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.tar.bz2 nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.tar.lz nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.tar.xz nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.tar.zst nixpkgs-77c413926230eb4fda6be41f666f5603129bbf73.zip |
gtk3: make gtk3 look for immodule cache in $NIX_PROFILE
Diffstat (limited to 'pkgs/development/libraries/gtk+/3.0-immodules.cache.patch')
-rw-r--r-- | pkgs/development/libraries/gtk+/3.0-immodules.cache.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gtk+/3.0-immodules.cache.patch b/pkgs/development/libraries/gtk+/3.0-immodules.cache.patch new file mode 100644 index 00000000000..bbe5f28dbd3 --- /dev/null +++ b/pkgs/development/libraries/gtk+/3.0-immodules.cache.patch @@ -0,0 +1,27 @@ +--- a/gtk/deprecated/gtkrc.c 2016-04-02 18:43:08.401663112 +0900 ++++ b/gtk/deprecated/gtkrc.c 2016-04-02 18:29:19.927608592 +0900 +@@ -774,5 +774,23 @@ + if (var) + result = g_strdup (var); + ++ // check NIX_PROFILES paths. ++ const gchar *nixProfilesEnv = g_getenv ("NIX_PROFILES"); ++ gchar *cachePath; ++ guint i; ++ ++ if(nixProfilesEnv && !result){ ++ gchar **paths = g_strsplit(nixProfilesEnv, " ", -1); ++ for (i = 0; paths[i] != NULL; i++){ ++ cachePath = g_build_filename(paths[i], "etc", "gtk-3.0", "immodules.cache", NULL); ++ if( g_file_test( cachePath, G_FILE_TEST_EXISTS) ){ ++ if(result) g_free(result); ++ result = g_strdup(cachePath); ++ } ++ g_free(cachePath); ++ } ++ g_strfreev(paths); ++ } ++ + if (!result) + { + |