unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
@ 2015-12-03  7:52 Ricardo Wurmus
  2015-12-03 10:01 ` Andy Wingo
  0 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2015-12-03  7:52 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]

Hi Guix,

a couple of months ago we discussed how to make IBus and GTK themes work
across different GTK versions.

See:

  http://lists.gnu.org/archive/html/guix-devel/2015-09/msg00617.html

To summarise, GTK itself only supports path environment variables that
are recognised by *all* versions of GTK, such as GTK_EXE_PREFIX or
GTK_PATH.  This is a problem as modules built for GTK3 cannot be loaded
by GTK2 (and vice versa).  This can result in segfaults or other nasty
effects that are hard to debug.

The attached patches modify our gtk packages such that they apply
patches against the GTK sources to enable support for two new
environment variables:

  * GUIX_GTK2_PATH, which is honoured exclusively by gtk+ 2.x, and
  * GUIX_GTK3_PATH, which is only honoured by gtk+ 3.x

Directories specified in these variables are searched first when GTK
looks for modules, such as input method modules provided by IBus.  A
user would just set both of these variables such:

   export GUIX_GTK2_PATH=$HOME/.guix-profile/lib/gtk-2.0
   export GUIX_GTK3_PATH=$HOME/.guix-profile/lib/gtk-3.0

With these variables set GTK2 will find the IBus input methods for GTK2
(and not those for GTK3), and vice versa.

I rebuilt both GTKs in my profile, and rebuilt ibus, ibus-libpinyin, and
xfce4-terminal and after removing some cached state (a problem which
we’ll have to fix eventually) I could input Chinese characters on the
terminal, indicating that the environment variables are in fact
recognised.

An additional patch to ibus-libpinyin was required because it previously
only worked by accident as I had a package installed in my profile that
also propagated gtk+.  The third attached patch adds gtk-propagated
inputs to ibus-libpinyin for the sole purpose of adding their
girepository directories to the GI_TYPELIB_PATH with which we’re
wrapping some executables.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-gtk-2-Add-patch-to-support-GUIX_GTK2_PATH.patch --]
[-- Type: text/x-patch, Size: 4863 bytes --]

From 87b0a54e92f51b885ea93ebc3e05c78fcfb94dcf Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 3 Dec 2015 08:30:04 +0100
Subject: [PATCH 1/3] gnu: gtk+-2: Add patch to support GUIX_GTK2_PATH.

* gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/gtk.scm (gtk+-2) [source]: Add patch.
[native-search-paths]: Add search path for GUIX_GTK2_PATH.
---
 gnu-system.am                                      |  1 +
 gnu/packages/gtk.scm                               |  9 ++++-
 .../patches/gtk2-respect-GUIX_GTK2_PATH.patch      | 46 ++++++++++++++++++++++
 3 files changed, 54 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch

diff --git a/gnu-system.am b/gnu-system.am
index 4e06853..677ade5 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -505,6 +505,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/guile-present-coding.patch		\
   gnu/packages/patches/guile-relocatable.patch			\
   gnu/packages/patches/guile-rsvg-pkgconfig.patch		\
+  gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
   gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
   gnu/packages/patches/hop-bigloo-4.0b.patch			\
   gnu/packages/patches/hop-linker-flags.patch			\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c0c0794..33feb2a 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -522,7 +522,8 @@ is part of the GNOME accessibility project.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj"))))
+              "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj"))
+            (patches (list (search-patch "gtk2-respect-GUIX_GTK2_PATH.patch")))))
    (build-system gnu-build-system)
    (outputs '("out" "doc"))
    (propagated-inputs
@@ -557,7 +558,11 @@ is part of the GNOME accessibility project.")
          ;; FIXME: re-enable tests requiring an X server
          (substitute* "gtk/Makefile.in"
            (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
-      %standard-phases)))
+       %standard-phases)))
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUIX_GTK2_PATH")
+           (files '("lib/gtk-2.0")))))
    (synopsis "Cross-platform toolkit for creating graphical user interfaces")
    (description
     "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch
new file mode 100644
index 0000000..93a8ddc
--- /dev/null
+++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch
@@ -0,0 +1,46 @@
+This patch makes GTK+ look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK2_PATH".  This can be used
+instead of "GTK_PATH" to make GTK+ find modules that are incompatible with
+other major versions of GTK+.
+
+--- a/gtk/gtkmodules.c	2014-09-29 22:02:17.000000000 +0200
++++ b/gtk/gtkmodules.c	2015-12-02 18:41:53.306396938 +0100
+@@ -55,6 +55,7 @@
+ get_module_path (void)
+ {
+   const gchar *module_path_env;
++  const gchar *module_guix_gtk2_path_env;
+   const gchar *exe_prefix;
+   const gchar *home_dir;
+   gchar *home_gtk_dir = NULL;
+@@ -70,6 +71,7 @@
+     home_gtk_dir = g_build_filename (home_dir, ".gtk-2.0", NULL);
+ 
+   module_path_env = g_getenv ("GTK_PATH");
++  module_guix_gtk2_path_env = g_getenv ("GUIX_GTK2_PATH");
+   exe_prefix = g_getenv ("GTK_EXE_PREFIX");
+ 
+   if (exe_prefix)
+@@ -77,9 +79,21 @@
+   else
+     default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL);
+ 
+-  if (module_path_env && home_gtk_dir)
++  if (module_guix_gtk2_path_env && module_path_env && home_gtk_dir)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++				module_guix_gtk2_path_env, module_path_env, home_gtk_dir, default_dir, NULL);
++  else if (module_guix_gtk2_path_env && home_gtk_dir)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++				module_guix_gtk2_path_env, home_gtk_dir, default_dir, NULL);
++  else if (module_guix_gtk2_path_env && module_path_env)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++				module_guix_gtk2_path_env, module_path_env, default_dir, NULL);
++  else if (module_path_env && home_gtk_dir)
+     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+ 				module_path_env, home_gtk_dir, default_dir, NULL);
++  else if (module_guix_gtk2_path_env)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++				module_guix_gtk2_path_env, default_dir, NULL);
+   else if (module_path_env)
+     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+ 				module_path_env, default_dir, NULL);
-- 
2.5.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-gtk-Add-patch-to-support-GUIX_GTK3_PATH.patch --]
[-- Type: text/x-patch, Size: 2163 bytes --]

From b8120ae8e21e234ffd0eb9f5de1d7809a0860c45 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 3 Dec 2015 08:32:06 +0100
Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.

* gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/gtk.scm (gtk+) [source]: Add patch.
[native-search-paths]: Add search path for GUIX_GTK3_PATH.
---
 gnu-system.am        | 1 +
 gnu/packages/gtk.scm | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 677ade5..580bd66 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -506,6 +506,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/guile-relocatable.patch			\
   gnu/packages/patches/guile-rsvg-pkgconfig.patch		\
   gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
+  gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch	\
   gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
   gnu/packages/patches/hop-bigloo-4.0b.patch			\
   gnu/packages/patches/hop-linker-flags.patch			\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 33feb2a..a4dd2d4 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -583,7 +583,8 @@ application suites.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))))
+              "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))
+            (patches (list (search-patch "gtk3-respect-GUIX_GTK3_PATH.patch")))))
    (propagated-inputs
     `(("at-spi2-atk" ,at-spi2-atk)
       ("atk" ,atk)
@@ -642,7 +643,11 @@ application suites.")
                  (loaders.cache (find-files librsvg "^loaders\\.cache$")))
             (wrap-program prog
               `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache))))
-        %standard-phases))))))
+        %standard-phases))))
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUIX_GTK3_PATH")
+           (files '("lib/gtk-3.0")))))))
 
 ;;;
 ;;; Guile bindings.
-- 
2.5.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-ibus-libpinyin-Include-more-directories-in-GI_TY.patch --]
[-- Type: text/x-patch, Size: 2179 bytes --]

From 2088ec24d2a69962310028d9cb686043fbde988d Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 3 Dec 2015 08:49:30 +0100
Subject: [PATCH 3/3] gnu: ibus-libpinyin: Include more directories in
 GI_TYPELIB_PATH.

* gnu/packages/ibus.scm (ibus-libpinyin)[inputs]: Add "gdk-pixbuf",
  "at-spi2-atk", "atk", "pango".
[arguments]: Add the new inputs' girepository-1.0 directories to the
GI_TYPELIB_PATH.
---
 gnu/packages/ibus.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 770d7ff..bec7964 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -135,6 +135,16 @@ may also simplify input method development.")
                                    "/lib/girepository-1.0")))
                 `("GI_TYPELIB_PATH" ":" prefix
                   (,(string-append (assoc-ref inputs "ibus")
+                                   "/lib/girepository-1.0")
+                   ,(string-append (assoc-ref inputs "gtk+")
+                                   "/lib/girepository-1.0")
+                   ,(string-append (assoc-ref inputs "pango")
+                                   "/lib/girepository-1.0")
+                   ,(string-append (assoc-ref inputs "gdk-pixbuf")
+                                   "/lib/girepository-1.0")
+                   ,(string-append (assoc-ref inputs "at-spi2-atk")
+                                   "/lib/girepository-1.0")
+                   ,(string-append (assoc-ref inputs "atk")
                                    "/lib/girepository-1.0"))))
               #t))))))
    (inputs
@@ -144,7 +154,14 @@ may also simplify input method development.")
       ("sqlite" ,sqlite)
       ("python" ,python-2)
       ("pyxdg" ,python2-pyxdg)
-      ("gtk+" ,gtk+)))
+      ("gtk+" ,gtk+)
+
+      ;; These are propagated by gtk+, but we need them to add the
+      ;; girepository directories to the GI_TYPELIB_PATH.
+      ("gdk-pixbuf" ,gdk-pixbuf)
+      ("at-spi2-atk" ,at-spi2-atk)
+      ("atk" ,atk)
+      ("pango" ,pango)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("intltool" ,intltool)
-- 
2.5.0


[-- Attachment #5: Type: text/plain, Size: 12 bytes --]


~~ Ricardo

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-03  7:52 [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables Ricardo Wurmus
@ 2015-12-03 10:01 ` Andy Wingo
  2015-12-03 21:59   ` Ricardo Wurmus
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Wingo @ 2015-12-03 10:01 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Thu 03 Dec 2015 07:52, Ricardo Wurmus <rekado@elephly.net> writes:

> From b8120ae8e21e234ffd0eb9f5de1d7809a0860c45 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Thu, 3 Dec 2015 08:32:06 +0100
> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>
> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
> * gnu-system.am (dist_patch_DATA): Add it.
> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
> ---
>  gnu-system.am        | 1 +
>  gnu/packages/gtk.scm | 9 +++++++--
>  2 files changed, 8 insertions(+), 2 deletions(-)

Missing the gtk3 patch?

Only question for me would be, would these patches with s/GUIX_// be
accepted upstream?  They should be submitted at least.

Andy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-03 10:01 ` Andy Wingo
@ 2015-12-03 21:59   ` Ricardo Wurmus
  2015-12-04  9:13     ` Andy Wingo
  2015-12-04 14:49     ` Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2015-12-03 21:59 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]


Andy Wingo <wingo@igalia.com> writes:

> On Thu 03 Dec 2015 07:52, Ricardo Wurmus <rekado@elephly.net> writes:
>
>> From b8120ae8e21e234ffd0eb9f5de1d7809a0860c45 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>
>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>> * gnu-system.am (dist_patch_DATA): Add it.
>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>> ---
>>  gnu-system.am        | 1 +
>>  gnu/packages/gtk.scm | 9 +++++++--
>>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> Missing the gtk3 patch?

Indeed.  Attached is an updated patch 2.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-gtk-Add-patch-to-support-GUIX_GTK3_PATH.patch --]
[-- Type: text/x-patch, Size: 4051 bytes --]

From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 3 Dec 2015 08:32:06 +0100
Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.

* gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/gtk.scm (gtk+) [source]: Add patch.
[native-search-paths]: Add search path for GUIX_GTK3_PATH.
---
 gnu-system.am                                      |  1 +
 gnu/packages/gtk.scm                               |  9 +++--
 .../patches/gtk3-respect-GUIX_GTK3_PATH.patch      | 38 ++++++++++++++++++++++
 3 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch

diff --git a/gnu-system.am b/gnu-system.am
index 677ade5..580bd66 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -506,6 +506,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/guile-relocatable.patch			\
   gnu/packages/patches/guile-rsvg-pkgconfig.patch		\
   gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
+  gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch	\
   gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
   gnu/packages/patches/hop-bigloo-4.0b.patch			\
   gnu/packages/patches/hop-linker-flags.patch			\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 33feb2a..a4dd2d4 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -583,7 +583,8 @@ application suites.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))))
+              "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))
+            (patches (list (search-patch "gtk3-respect-GUIX_GTK3_PATH.patch")))))
    (propagated-inputs
     `(("at-spi2-atk" ,at-spi2-atk)
       ("atk" ,atk)
@@ -642,7 +643,11 @@ application suites.")
                  (loaders.cache (find-files librsvg "^loaders\\.cache$")))
             (wrap-program prog
               `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache))))
-        %standard-phases))))))
+        %standard-phases))))
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUIX_GTK3_PATH")
+           (files '("lib/gtk-3.0")))))))
 
 ;;;
 ;;; Guile bindings.
diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch
new file mode 100644
index 0000000..66fd2fd
--- /dev/null
+++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch
@@ -0,0 +1,38 @@
+This patch makes GTK+ look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK3_PATH".  This can be used
+instead of "GTK_PATH" to make GTK+ find modules that are incompatible with
+other major versions of GTK+.
+
+--- a/gtk/gtkmodules.c	2015-09-20 20:09:05.060590217 +0200
++++ b/gtk/gtkmodules.c	2015-09-20 20:10:33.423124833 +0200
+@@ -52,6 +52,7 @@
+ get_module_path (void)
+ {
+   const gchar *module_path_env;
++  const gchar *module_guix_gtk3_path_env;
+   const gchar *exe_prefix;
+   gchar *module_path;
+   gchar *default_dir;
+@@ -61,6 +62,7 @@
+     return result;
+ 
+   module_path_env = g_getenv ("GTK_PATH");
++  module_guix_gtk3_path_env = g_getenv ("GUIX_GTK3_PATH");
+   exe_prefix = g_getenv ("GTK_EXE_PREFIX");
+ 
+   if (exe_prefix)
+@@ -68,7 +70,13 @@
+   else
+     default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL);
+ 
+-  if (module_path_env)
++  if (module_guix_gtk3_path_env && module_path_env)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++				module_guix_gtk3_path_env, module_path_env, default_dir, NULL);
++  else if (module_guix_gtk3_path_env)
++    module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++				module_guix_gtk3_path_env, default_dir, NULL);
++  else if (module_path_env)
+     module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+ 				module_path_env, default_dir, NULL);
+   else
-- 
2.5.0


[-- Attachment #3: Type: text/plain, Size: 535 bytes --]


> Only question for me would be, would these patches with s/GUIX_// be
> accepted upstream?  They should be submitted at least.

I haven’t tried and I don’t really know how to present it.  For
FHS-abiding distributions this is not a problem usually, because
GTK_EXE_PREFIX could be used instead.  We cannot set GTK_EXE_PREFIX to
~/.guix-profile/lib because that would make it necessary for ibus (for
example) to propagate the gtk+ package, which is unacceptable for us.

I think FHS people simply have no need for it.

~~ Ricardo

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-03 21:59   ` Ricardo Wurmus
@ 2015-12-04  9:13     ` Andy Wingo
  2015-12-04 14:49     ` Ludovic Courtès
  1 sibling, 0 replies; 12+ messages in thread
From: Andy Wingo @ 2015-12-04  9:13 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Thu 03 Dec 2015 21:59, Ricardo Wurmus <rekado@elephly.net> writes:

>> Andy Wingo <wingo@igalia.com> writes:
>>
>> Only question for me would be, would these patches with s/GUIX_// be
>> accepted upstream?  They should be submitted at least.
> 
> I haven’t tried and I don’t really know how to present it.  For
> FHS-abiding distributions this is not a problem usually, because
> GTK_EXE_PREFIX could be used instead.  We cannot set GTK_EXE_PREFIX to
> ~/.guix-profile/lib because that would make it necessary for ibus (for
> example) to propagate the gtk+ package, which is unacceptable for us.
> 
> I think FHS people simply have no need for it.

ACK.  In that case LGTM FWIW.  I wonder what Nix does here, but that's
just idle wondering :)

Cheers,

Andy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-03 21:59   ` Ricardo Wurmus
  2015-12-04  9:13     ` Andy Wingo
@ 2015-12-04 14:49     ` Ludovic Courtès
  2015-12-08 20:25       ` Ricardo Wurmus
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2015-12-04 14:49 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Thu, 3 Dec 2015 08:32:06 +0100
> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>
> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
> * gnu-system.am (dist_patch_DATA): Add it.
> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
> [native-search-paths]: Add search path for GUIX_GTK3_PATH.

LGTM.

This will have to go to a separate branch.  We’ll get Hydra to build it
once it’s done with the security updates.

I agree with Andy that this needs to be discussed with upstream though.
Could you open a bug on their tracker and explain the problem and
proposed solution?

Thanks for addressing it!

Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-04 14:49     ` Ludovic Courtès
@ 2015-12-08 20:25       ` Ricardo Wurmus
  2015-12-09 13:53         ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2015-12-08 20:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>
>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>> * gnu-system.am (dist_patch_DATA): Add it.
>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>
> LGTM.
>
> This will have to go to a separate branch.  We’ll get Hydra to build it
> once it’s done with the security updates.

Could you push them to a new branch then?  I have no control over what
Hydra builds and I assume you’d want to rebase them on top of the
security updates.

> I agree with Andy that this needs to be discussed with upstream though.
> Could you open a bug on their tracker and explain the problem and
> proposed solution?

Yes, I’ll take care of this.

~~ Ricardo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-08 20:25       ` Ricardo Wurmus
@ 2015-12-09 13:53         ` Ludovic Courtès
  2015-12-25 11:16           ` Ricardo Wurmus
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2015-12-09 13:53 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
>>> From: Ricardo Wurmus <rekado@elephly.net>
>>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>>
>>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>>> * gnu-system.am (dist_patch_DATA): Add it.
>>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>>
>> LGTM.
>>
>> This will have to go to a separate branch.  We’ll get Hydra to build it
>> once it’s done with the security updates.
>
> Could you push them to a new branch then?  I have no control over what
> Hydra builds and I assume you’d want to rebase them on top of the
> security updates.

Here’s the deal: If you push a new branch based on current master, I’ll
make sure Hydra builds it.  :-)

>> I agree with Andy that this needs to be discussed with upstream though.
>> Could you open a bug on their tracker and explain the problem and
>> proposed solution?
>
> Yes, I’ll take care of this.

Awesome, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-09 13:53         ` Ludovic Courtès
@ 2015-12-25 11:16           ` Ricardo Wurmus
  2015-12-29  1:10             ` Mark H Weaver
  0 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2015-12-25 11:16 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>
>>>> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
>>>> From: Ricardo Wurmus <rekado@elephly.net>
>>>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>>>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>>>
>>>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>>>> * gnu-system.am (dist_patch_DATA): Add it.
>>>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>>>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>>>
>>> LGTM.
>>>
>>> This will have to go to a separate branch.  We’ll get Hydra to build it
>>> once it’s done with the security updates.
>>
>> Could you push them to a new branch then?  I have no control over what
>> Hydra builds and I assume you’d want to rebase them on top of the
>> security updates.
>
> Here’s the deal: If you push a new branch based on current master, I’ll
> make sure Hydra builds it.  :-)

I rebased the patches on top of current master and pushed them to a
new branch “gtk-path-patch”.

>>> I agree with Andy that this needs to be discussed with upstream though.
>>> Could you open a bug on their tracker and explain the problem and
>>> proposed solution?
>>
>> Yes, I’ll take care of this.

My email to gtk-devel-list@gnome.org is still awaiting moderation :-/
Maybe I should try again after subscribing.

~~ Ricardo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-25 11:16           ` Ricardo Wurmus
@ 2015-12-29  1:10             ` Mark H Weaver
  2015-12-30  3:23               ` Mark H Weaver
  0 siblings, 1 reply; 12+ messages in thread
From: Mark H Weaver @ 2015-12-29  1:10 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> writes:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> Ludovic Courtès <ludo@gnu.org> writes:
>>>
>>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>>
>>>>> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
>>>>> From: Ricardo Wurmus <rekado@elephly.net>
>>>>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>>>>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>>>>
>>>>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>>>>> * gnu-system.am (dist_patch_DATA): Add it.
>>>>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>>>>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>>>>
>>>> LGTM.
>>>>
>>>> This will have to go to a separate branch.  We’ll get Hydra to build it
>>>> once it’s done with the security updates.
>>>
>>> Could you push them to a new branch then?  I have no control over what
>>> Hydra builds and I assume you’d want to rebase them on top of the
>>> security updates.
>>
>> Here’s the deal: If you push a new branch based on current master, I’ll
>> make sure Hydra builds it.  :-)
>
> I rebased the patches on top of current master and pushed them to a
> new branch “gtk-path-patch”.

I just rebased them again, and started Hydra building the branch.

http://hydra.gnu.org/jobset/gnu/gtk-path-patch

      Mark

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-29  1:10             ` Mark H Weaver
@ 2015-12-30  3:23               ` Mark H Weaver
  2015-12-30 16:20                 ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: Mark H Weaver @ 2015-12-30  3:23 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>
>>>> Ludovic Courtès <ludo@gnu.org> writes:
>>>>
>>>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>>>
>>>>>> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
>>>>>> From: Ricardo Wurmus <rekado@elephly.net>
>>>>>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>>>>>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>>>>>
>>>>>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>>>>>> * gnu-system.am (dist_patch_DATA): Add it.
>>>>>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>>>>>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>>>>>
>>>>> LGTM.
>>>>>
>>>>> This will have to go to a separate branch.  We’ll get Hydra to build it
>>>>> once it’s done with the security updates.
>>>>
>>>> Could you push them to a new branch then?  I have no control over what
>>>> Hydra builds and I assume you’d want to rebase them on top of the
>>>> security updates.
>>>
>>> Here’s the deal: If you push a new branch based on current master, I’ll
>>> make sure Hydra builds it.  :-)
>>
>> I rebased the patches on top of current master and pushed them to a
>> new branch “gtk-path-patch”.
>
> I just rebased them again, and started Hydra building the branch.
>
> http://hydra.gnu.org/jobset/gnu/gtk-path-patch

This is now sufficiently built to merge to 'master', but I'm not sure
whether it was decided to do this before getting feedback from upstream.

>>>>> I agree with Andy that this needs to be discussed with upstream though.
>>>>> Could you open a bug on their tracker and explain the problem and
>>>>> proposed solution?
>>>>
>>>> Yes, I’ll take care of this.
>>
>> My email to gtk-devel-list@gnome.org is still awaiting moderation :-/
>> Maybe I should try again after subscribing.

I haven't followed this thread, so I'll leave it to others to decide
how to proceed.

      Mark

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-30  3:23               ` Mark H Weaver
@ 2015-12-30 16:20                 ` Ludovic Courtès
  2015-12-31 11:27                   ` Ricardo Wurmus
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2015-12-30 16:20 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> Mark H Weaver <mhw@netris.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Ludovic Courtès <ludo@gnu.org> writes:
>>>
>>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>>
>>>>> Ludovic Courtès <ludo@gnu.org> writes:
>>>>>
>>>>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>>>>
>>>>>>> From 11f502281064525a067c1453cd2b7b663bf6c3bb Mon Sep 17 00:00:00 2001
>>>>>>> From: Ricardo Wurmus <rekado@elephly.net>
>>>>>>> Date: Thu, 3 Dec 2015 08:32:06 +0100
>>>>>>> Subject: [PATCH 2/3] gnu: gtk+: Add patch to support GUIX_GTK3_PATH.
>>>>>>>
>>>>>>> * gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH: New file.
>>>>>>> * gnu-system.am (dist_patch_DATA): Add it.
>>>>>>> * gnu/packages/gtk.scm (gtk+) [source]: Add patch.
>>>>>>> [native-search-paths]: Add search path for GUIX_GTK3_PATH.
>>>>>>
>>>>>> LGTM.
>>>>>>
>>>>>> This will have to go to a separate branch.  We’ll get Hydra to build it
>>>>>> once it’s done with the security updates.
>>>>>
>>>>> Could you push them to a new branch then?  I have no control over what
>>>>> Hydra builds and I assume you’d want to rebase them on top of the
>>>>> security updates.
>>>>
>>>> Here’s the deal: If you push a new branch based on current master, I’ll
>>>> make sure Hydra builds it.  :-)
>>>
>>> I rebased the patches on top of current master and pushed them to a
>>> new branch “gtk-path-patch”.
>>
>> I just rebased them again, and started Hydra building the branch.
>>
>> http://hydra.gnu.org/jobset/gnu/gtk-path-patch
>
> This is now sufficiently built to merge to 'master', but I'm not sure
> whether it was decided to do this before getting feedback from upstream.

I think there was consensus that this is OK to install the patch for our
purposes, and that we can always adjust should upstream propose
something different.

Ricardo?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables.
  2015-12-30 16:20                 ` Ludovic Courtès
@ 2015-12-31 11:27                   ` Ricardo Wurmus
  0 siblings, 0 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2015-12-31 11:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Mark H Weaver <mhw@netris.org> skribis:
>
>> This is now sufficiently built to merge to 'master', but I'm not sure
>> whether it was decided to do this before getting feedback from upstream.
>
> I think there was consensus that this is OK to install the patch for our
> purposes, and that we can always adjust should upstream propose
> something different.
>
> Ricardo?

I’ll resend my patches to the GTK mailing list in a moment (after
subscribing).

I’m in no hurry to get this patched version of GTK merged into master
because it is just *one* necessary step in making input methods (and
possibly themes) work in GuixSD without having to install the GTK
packages.  Alone it is insufficient in fixing this issue.

~~ Ricardo

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-12-31 11:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03  7:52 [PATCH] gtk+: Support GUIX_GTK{2,3}_PATH variables Ricardo Wurmus
2015-12-03 10:01 ` Andy Wingo
2015-12-03 21:59   ` Ricardo Wurmus
2015-12-04  9:13     ` Andy Wingo
2015-12-04 14:49     ` Ludovic Courtès
2015-12-08 20:25       ` Ricardo Wurmus
2015-12-09 13:53         ` Ludovic Courtès
2015-12-25 11:16           ` Ricardo Wurmus
2015-12-29  1:10             ` Mark H Weaver
2015-12-30  3:23               ` Mark H Weaver
2015-12-30 16:20                 ` Ludovic Courtès
2015-12-31 11:27                   ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).