summaryrefslogtreecommitdiff
path: root/gnu/packages/hardware.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-12-28 22:55:00 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-12-28 23:09:41 -0500
commit72875031a44673e7867ac7b1e8f17feab8d6fa45 (patch)
tree3fa6728498baaf8ad5d67f04e733ad5e39373658 /gnu/packages/hardware.scm
parentd6ea9f8b38df7de1194d8106488a8c33cce64fd1 (diff)
gnu: ddcutil: Install udev rules at their expected location.
* gnu/packages/hardware.scm (ddcutil) [arguments]: New field. [description]: Document how the included udev rules can be used.
Diffstat (limited to 'gnu/packages/hardware.scm')
-rw-r--r--gnu/packages/hardware.scm28
1 files changed, 24 insertions, 4 deletions
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index f73896460bb..81f38d069b2 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -491,6 +491,22 @@ RGB animations.")
491 (sha256 491 (sha256
492 (base32 "0hm0cm4m4hk1jjy7kddg613mynvwlii3kp8al0j9v3c6mcx3p4mx")))) 492 (base32 "0hm0cm4m4hk1jjy7kddg613mynvwlii3kp8al0j9v3c6mcx3p4mx"))))
493 (build-system gnu-build-system) 493 (build-system gnu-build-system)
494 (arguments
495 (list
496 #:phases
497 #~(modify-phases %standard-phases
498 (add-after 'install 'install-udev-rules
499 (lambda* (#:key outputs #:allow-other-keys)
500 ;; Move the udev rules to their expected location in Guix
501 ;; System, so they can be more easily used.
502 (let ((rules.d (string-append #$output "/lib/udev/rules.d")))
503 (mkdir-p (dirname rules.d))
504 (rename-file (string-append #$output "/share/ddcutil/data")
505 rules.d)
506 ;; Patch a reference to the ddcutil command.
507 (substitute* (string-append rules.d "/45-ddcutil-usb.rules")
508 (("/usr/bin/ddcutil")
509 (search-input-file outputs "bin/ddcutil")))))))))
494 (native-inputs 510 (native-inputs
495 (list pkg-config)) 511 (list pkg-config))
496 (inputs 512 (inputs
@@ -498,9 +514,9 @@ RGB animations.")
498 glib 514 glib
499 kmod 515 kmod
500 i2c-tools 516 i2c-tools
501 libdrm ; enhanced diagnostics 517 libdrm ;enhanced diagnostics
502 libusb ; support USB monitors 518 libusb ;support USB monitors
503 libx11 ; enhanced diagnostics 519 libx11 ;enhanced diagnostics
504 libxrandr 520 libxrandr
505 zlib)) 521 zlib))
506 (home-page "https://www.ddcutil.com/") 522 (home-page "https://www.ddcutil.com/")
@@ -519,7 +535,11 @@ communicate over USB as per the USB Monitor Control Class Specification.
519One particular use case is in colour profile management. Monitor calibration 535One particular use case is in colour profile management. Monitor calibration
520is relative to the monitor colour settings currently in effect, e.g. red gain. 536is relative to the monitor colour settings currently in effect, e.g. red gain.
521ddcutil allows colour-related settings to be saved at the time a monitor is 537ddcutil allows colour-related settings to be saved at the time a monitor is
522calibrated, and restored when the calibration is applied.") 538calibrated, and restored when the calibration is applied.
539
540This package includes udev rules that can be used by adding this package to
541the @code{rules} field of the @code{udev-configuration} record. It gives
542read/write access to i2c devices to users in the @samp{i2c} group.")
523 (license (list license:bsd-3 ; FindDDCUtil.cmake 543 (license (list license:bsd-3 ; FindDDCUtil.cmake
524 license:gpl2+)))) ; everything else 544 license:gpl2+)))) ; everything else
525 545