guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: rtl-sdr: Install udev rules.


From: guix-commits
Subject: branch master updated: gnu: rtl-sdr: Install udev rules.
Date: Thu, 07 May 2020 10:54:40 -0400

This is an automated email from the git hooks/post-receive script.

glv pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 2bee789  gnu: rtl-sdr: Install udev rules.
2bee789 is described below

commit 2bee789a47eb61d17945d6cb87700c9719ebe887
Author: Guillaume Le Vaillant <address@hidden>
AuthorDate: Thu May 7 16:48:49 2020 +0200

    gnu: rtl-sdr: Install udev rules.
    
    * gnu/packages/radio.scm (rtl-sdr)[arguments]: Add '-DINSTALL_UDEV_RULES=ON'
      to configure-flags and add a 'fix-paths' phase to put the udev rules in 
the
      right place.
      [description]: Indicate how to add the udev rules to the system
      configuration.
---
 gnu/packages/radio.scm | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index 229597b..7fc6c4b 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -123,13 +123,36 @@ mathematical operations, and much more.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (arguments
-     `(#:configure-flags '("-DDETACH_KERNEL_DRIVER=ON")
-       #:tests? #f)) ; No tests
+     `(#:configure-flags '("-DDETACH_KERNEL_DRIVER=ON"
+                           "-DINSTALL_UDEV_RULES=ON")
+       #:tests? #f ; No tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-paths
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+               (("DESTINATION \"/etc/")
+                (string-append "DESTINATION \""
+                               (assoc-ref outputs "out")
+                               "/etc/")))
+             #t)))))
     (home-page "https://osmocom.org/projects/sdr/wiki/rtl-sdr";)
     (synopsis "Software defined radio driver for Realtek RTL2832U")
     (description "DVB-T dongles based on the Realtek RTL2832U can be used as a
 cheap software defined radio, since the chip allows transferring the raw I/Q
-samples to the host.  @code{rtl-sdr} provides drivers for this purpose.")
+samples to the host.  @code{rtl-sdr} provides drivers for this purpose.
+
+To install the rtl-sdr udev rules, you must add this package in the
+configuration of the udev system service. E.g.:
+
+@lisp
+(services
+ (modify-services %desktop-services
+  (udev-service-type config =>
+   (udev-configuration (inherit config)
+    (rules (cons rtl-sdr
+            (udev-configuration-rules config)))))))
+@end lisp")
     (license license:gpl2+)))
 
 (define-public chirp



reply via email to

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