tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
gtk2: make gtk2 look for immodule cache in $NIX_PROFILE
Eric Sagnes
9 years ago
3e2318ec
77c41392
+29
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
gtk+
2.0-immodules.cache.patch
2.x.nix
+27
pkgs/development/libraries/gtk+/2.0-immodules.cache.patch
···
1
1
+
--- a/gtk/gtkrc.c 2014-09-30 05:02:17.000000000 +0900
2
2
+
+++ b/gtk/gtkrc.c 2016-04-09 17:39:51.363288355 +0900
3
3
+
@@ -445,5 +445,23 @@
4
4
+
if (var)
5
5
+
result = g_strdup (var);
6
6
+
7
7
+
+ // check NIX_PROFILES paths.
8
8
+
+ const gchar *nixProfilesEnv = g_getenv ("NIX_PROFILES");
9
9
+
+ gchar *cachePath;
10
10
+
+ guint i;
11
11
+
+
12
12
+
+ if(nixProfilesEnv && !result){
13
13
+
+ gchar **paths = g_strsplit(nixProfilesEnv, " ", -1);
14
14
+
+ for (i = 0; paths[i] != NULL; i++){
15
15
+
+ cachePath = g_build_filename(paths[i], "etc", "gtk-2.0", "immodules.cache", NULL);
16
16
+
+ if( g_file_test( cachePath, G_FILE_TEST_EXISTS) ){
17
17
+
+ if(result) g_free(result);
18
18
+
+ result = g_strdup(cachePath);
19
19
+
+ }
20
20
+
+ g_free(cachePath);
21
21
+
+ }
22
22
+
+ g_strfreev(paths);
23
23
+
+ }
24
24
+
+
25
25
+
if (!result)
26
26
+
{
27
27
+
+2
pkgs/development/libraries/gtk+/2.x.nix
···
26
26
27
27
nativeBuildInputs = [ setupHook perl pkgconfig gettext ];
28
28
29
29
+
patches = [ ./2.0-immodules.cache.patch ];
30
30
+
29
31
propagatedBuildInputs = with xorg; with stdenv.lib;
30
32
[ glib cairo pango gdk_pixbuf atk ]
31
33
++ optionals (stdenv.isLinux || stdenv.isDarwin) [