Subject: bug#41025: blueman does not start

From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 09:56:19 -0400

Hi Pierre!

> It seems that the blueman package is missing a wrapper unless I'm
> missing something:

When I packaged it, all I got was error regarding dbus. But now it seems there
are more errors. I am wondering if it has to do with updates in gtk and/or glib
and/or gobject-introspection.

Also, I found out that python references are not getting patched during
the build. I have made a patch to fix it, which I attached with this email.

Regards,
RG.
>From 4a2739cfa69d3537dcd3d4cee85d33bd790d0980 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 09:51:09 -0400
Subject: [PATCH] gnu: blueman: Fix python references.

* gnu/packages/networking.scm (blueman): Fix python references.
[arguments]:<#:phases>:['patch-python-references]: New phase.
---
 gnu/packages/networking.scm | 39 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 94b521584f..b775a9e689 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -143,7 +143,44 @@
         "--enable-polkit"
         "--disable-appindicator"         ; Deprecated
         "--with-systemdsystemunitdir=no" ; Not required
-        "--with-systemduserunitdir=no")))  ; Not required
+        "--with-systemduserunitdir=no")  ; Not required
+       #:phases
+       (modify-phases %standard-phases
+         ;; Python references are not being patched in patch-phase of build;
+         ;; despite using python-wrapper as input. So patching them manually.
+         (add-after 'unpack 'patch-python-references
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "apps/blueman-adapters.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-applet.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-assistant.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-manager.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-mechanism.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-report.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-rfcomm-watcher.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-sendto.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-services.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             (substitute* "apps/blueman-tray.in"
+               (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                            "/bin/python3.7")))
+             #t)))))
     (native-inputs
      `(("cython" ,python-cython)
        ("glib:bin" ,glib "bin")
-- 
2.26.2