tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
gtk3: make gtk3 look for immodule cache in $NIX_PROFILE
Eric Sagnes
9 years ago
77c41392
ab428dce
+29
-7
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
gtk+
3.0-immodules.cache.patch
3.x.nix
+27
pkgs/development/libraries/gtk+/3.0-immodules.cache.patch
···
1
1
+
--- a/gtk/deprecated/gtkrc.c 2016-04-02 18:43:08.401663112 +0900
2
2
+
+++ b/gtk/deprecated/gtkrc.c 2016-04-02 18:29:19.927608592 +0900
3
3
+
@@ -774,5 +774,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-3.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
-7
pkgs/development/libraries/gtk+/3.x.nix
···
28
28
29
29
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
30
30
31
31
+
patches = [ ./3.0-immodules.cache.patch ];
32
32
+
31
33
buildInputs = [ libxkbcommon epoxy json_glib ];
32
34
propagatedBuildInputs = with xorg; with stdenv.lib;
33
35
[ expat glib cairo pango gdk_pixbuf atk at_spi2_atk
···
57
59
substituteInPlace "$out/lib/gtk-3.0/3.0.0/printbackends/libprintbackend-cups.la" \
58
60
--replace '-L${gmp.dev}/lib' '-L${gmp.out}/lib'
59
61
'';
60
60
-
61
61
-
passthru = {
62
62
-
gtkExeEnvPostBuild = ''
63
63
-
rm $out/lib/gtk-3.0/3.0.0/immodules.cache
64
64
-
$out/bin/gtk-query-immodules-3.0 $out/lib/gtk-3.0/3.0.0/immodules/*.so > $out/lib/gtk-3.0/3.0.0/immodules.cache
65
65
-
''; # workaround for bug of nix-mode for Emacs */ '';
66
66
-
};
67
62
68
63
meta = with stdenv.lib; {
69
64
description = "A multi-platform toolkit for creating graphical user interfaces";