diff mbox series

[bug#44720] gnu: astroid: Fix inputs.

Message ID 20201118105045.GB31988@E5400
State Accepted
Headers show
Series [bug#44720] gnu: astroid: Fix inputs. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Efraim Flashner Nov. 18, 2020, 10:50 a.m. UTC
On Wed, Nov 18, 2020 at 11:22:30AM +0100, Tanguy LE CARROUR wrote:
> Hi,
> 
> 
> Excerpts from Efraim Flashner's message of November 18, 2020 11:03 am:
> > Can you try the attached patch? It wraps the binary in GI_TYPELIB_PATH
> > instead of propagating gsettings-desktop-schemas.
> 
> Nop, does not work! :-(
> 
> I still get the following error message on startup:
> 
> ```
> (astroid:7236): GLib-GIO-ERROR **: 11:19:11.738: Settings schema 'org.gnome.desktop.interface' is not installed
> ```
> 

I have another patch to try!

Comments

Tanguy LE CARROUR Nov. 18, 2020, 1:58 p.m. UTC | #1
Hi,


Excerpts from Efraim Flashner's message of November 18, 2020 11:50 am:
> On Wed, Nov 18, 2020 at 11:22:30AM +0100, Tanguy LE CARROUR wrote:
>> Excerpts from Efraim Flashner's message of November 18, 2020 11:03 am:
>> > Can you try the attached patch? It wraps the binary in GI_TYPELIB_PATH
>> > instead of propagating gsettings-desktop-schemas.
>> 
>> Nop, does not work! :-(
>> 
>> I still get the following error message on startup:
>> 
>> ```
>> (astroid:7236): GLib-GIO-ERROR **: 11:19:11.738: Settings schema 'org.gnome.desktop.interface' is not installed
>> ```
>> 
> 
> I have another patch to try!

And this one works fine! I'll have to read it again, just to make sure I
understand everything! ^_^'

Thanks
Efraim Flashner Nov. 18, 2020, 2:15 p.m. UTC | #2
On Wed, Nov 18, 2020 at 02:58:13PM +0100, Tanguy LE CARROUR wrote:
> Hi,
> 
> 
> Excerpts from Efraim Flashner's message of November 18, 2020 11:50 am:
> > On Wed, Nov 18, 2020 at 11:22:30AM +0100, Tanguy LE CARROUR wrote:
> >> Excerpts from Efraim Flashner's message of November 18, 2020 11:03 am:
> >> > Can you try the attached patch? It wraps the binary in GI_TYPELIB_PATH
> >> > instead of propagating gsettings-desktop-schemas.
> >> 
> >> Nop, does not work! :-(
> >> 
> >> I still get the following error message on startup:
> >> 
> >> ```
> >> (astroid:7236): GLib-GIO-ERROR **: 11:19:11.738: Settings schema 'org.gnome.desktop.interface' is not installed
> >> ```
> >> 
> > 
> > I have another patch to try!
> 
> And this one works fine! I'll have to read it again, just to make sure I
> understand everything! ^_^'

Yay! The short version is 'wrap-with-GI_TYPELIB_PATH makes sure the
TYPELIB path is set correctly. When you said the settings schema was
missing I figured it needed the compile-schema phase from the
glib-or-gtk build-system, and it almost definitely needed the 'wrap phase
from glib-or-gtk also.

> 
> Thanks
> 

NP :) Patch pushed!
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 59f49d1247..1e2dd4035b 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -729,7 +729,13 @@  mailpack.  What can alterMIME do?
            #t))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags (list "-GNinja")
+     `(#:modules ((guix build cmake-build-system)
+                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  (guix build utils)
+                  (ice-9 match))
+       #:imported-modules ((guix build glib-or-gtk-build-system)
+                           ,@%cmake-build-system-modules)
+       #:configure-flags (list "-GNinja")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'skip-markdown-test
@@ -759,7 +765,26 @@  mailpack.  What can alterMIME do?
              #t))
          (replace 'install
            (lambda _
-             (invoke "ninja" "install"))))))
+             (invoke "ninja" "install")))
+         (add-after 'install 'wrap-with-GI_TYPELIB_PATH
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (paths (map (match-lambda
+                                 ((outputs . directory)
+                                  (let ((girepodir (string-append
+                                                    directory
+                                                    "/lib/girepository-1.0")))
+                                    (if (file-exists? girepodir)
+                                        girepodir
+                                        #f))))
+                               inputs)))
+               (wrap-program (string-append out "/bin/astroid")
+                 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
+             #t))
+         (add-after 'install 'glib-or-gtk-compile-schemas
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
+         (add-after 'install 'glib-or-gtk-wrap
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
      `(("glib-networking" ,glib-networking)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
@@ -781,6 +806,8 @@  mailpack.  What can alterMIME do?
        ("python" ,python-wrapper)
        ("python-pygobject" ,python-pygobject)
        ("webkitgtk" ,webkitgtk)))
+    (propagated-inputs
+     `(("adwaita-icon-theme" ,adwaita-icon-theme))) ; Required for the thread view
     (home-page "https://astroidmail.github.io/")
     (synopsis "GTK frontend to the notmuch mail system")
     (description