[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: light: Install udev rules to allow sudo-less
From: |
guix-commits |
Subject: |
branch master updated: gnu: light: Install udev rules to allow sudo-less invocations. |
Date: |
Mon, 27 Jan 2020 13:01:18 -0500 |
This is an automated email from the git hooks/post-receive script.
efraim pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new fcb510c gnu: light: Install udev rules to allow sudo-less invocations.
fcb510c is described below
commit fcb510c541e83291ea6682cba87020a913c64914
Author: Amin Bandali <address@hidden>
AuthorDate: Mon Jan 27 09:33:37 2020 -0500
gnu: light: Install udev rules to allow sudo-less invocations.
* gnu/packages/linux.scm (light)[arguments]: Substitute the absolute paths
of chgrp and chmod in 90-backlight.rules and install the rules file to the
special lib/udev/rules.d/ directory of the out output. This allows for
any member of the video group to set brightness using light without sudo.
Signed-off-by: Efraim Flashner <address@hidden>
---
gnu/packages/linux.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9b0dfd8..5162dff 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5042,6 +5042,21 @@ monitoring tools for Linux. These include
@code{mpstat}, @code{iostat},
(base32 "0zrjipd392bzjvxx0rjrb0cgi0ix1d83fwgw1mcy8kc4d16cgyjg"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-udev-rules-absolute-path-bins
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "90-backlight.rules"
+ (("/bin/chgrp") (which "chgrp"))
+ (("/bin/chmod") (which "chmod")))
+ #t))
+ (add-after 'install 'install-udev-rules
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file
+ "90-backlight.rules" (string-append out "/lib/udev/rules.d"))
+ #t))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: light: Install udev rules to allow sudo-less invocations.,
guix-commits <=