Subject: bug#41025: blueman does not start

From: Pierre Neidhardt <[email-masked]>
Date: Sun, 10 May 2020 11:27:54 +0200

Sorry to disappoint :p  Sadly this patch does not work yet ;)

- You've hardcoded the python version (3.7) while you should get it
dynamically from the one you are using.

You can try using something like

--8<---------------cut here---------------start------------->8---
,(version-major+minor (package-version python))
--8<---------------cut here---------------end--------------->8---

- You've hardcoded paths to ~/.guix-profile which should be avoided
  because profiles can be anywhere.

--8<---------------cut here---------------start------------->8---
+             (substitute*
+                 '("apps/blueman-mechanism.in" "blueman/Functions.py")
+               (("/usr/bin:/bin:/usr/sbin:/sbin")
+                (string-append
+                 "~/.guix-profile/bin:"
+                 "/run/current-system/profile/bin:"
+                 "~/.guix-profile/sbin:"
+                 "/run/current-system/profile/sbin"))
+               ((":/sbin:/usr/sbin")
+                (string-append
+                 ":/run/current-system/profile/sbin:"
+                 "~/.guix-profile/sbin")))
--8<---------------cut here---------------end--------------->8---

I think this should be replace by the Python equivalent of `(getenv "PATH")`.

- In the following comment, the ';' should be a colon.  "patching"
  should probably be something like "we patch".

--8<---------------cut here---------------start------------->8---
+         ;; Python references are not being patched in patch-phase of build;
+         ;; despite using python-wrapper as input. So patching them manually.
--8<---------------cut here---------------end--------------->8---

Stay put, almost there! :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/