guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.


From: ???
Subject: 04/04: gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.
Date: Sat, 18 Jun 2016 01:53:21 +0000 (UTC)

iyzsong pushed a commit to branch master
in repository guix.

commit 87a16de7441cf6af8e786a5bcba854c5e1484599
Author: 宋文武 <address@hidden>
Date:   Fri Jun 17 20:35:21 2016 +0800

    gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.
    
    * gnu/packages/linux.scm (bluez)[arguments]: Add 'post-install' phase.
---
 gnu/packages/linux.scm |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e71ecbe..16fd5d0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2429,7 +2429,28 @@ Bluetooth audio output devices like headphones or 
loudspeakers.")
                "--disable-systemd"
                ;; Install dbus/udev files to the correct location.
                (string-append "--with-dbusconfdir=" out "/etc")
-               (string-append "--with-udevdir=" out "/lib/udev")))))
+               (string-append "--with-udevdir=" out "/lib/udev")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'post-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out        (assoc-ref outputs "out"))
+                    (servicedir (string-append out "/share/dbus-1/services"))
+                    (service    "obexd/src/org.bluez.obex.service")
+                    (rule       (string-append
+                                 out "/lib/udev/rules.d/97-hid2hci.rules")))
+               ;; Install the obex dbus service file.
+               (substitute* service
+                 (("/bin/false")
+                  (string-append out "/libexec/bluetooth/obexd")))
+               (install-file service servicedir)
+               ;; Fix paths in the udev rule.
+               (substitute* rule
+                 (("hid2hci --method")
+                  (string-append out "/lib/udev/hid2hci --method"))
+                 (("/sbin/udevadm")
+                  (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gnu-gettext)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]