diff options
author | Amin Bandali <mab@gnu.org> | 2020-01-27 09:33:37 -0500 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-01-27 19:58:21 +0200 |
commit | fcb510c541e83291ea6682cba87020a913c64914 (patch) | |
tree | d7c21b4301bcd79af75fede129177111c4f2ebb7 /gnu/packages/linux.scm | |
parent | 61b95c15cfb2c9b0d02cf09f93c0df76be0972b5 (diff) | |
download | patches-fcb510c541e83291ea6682cba87020a913c64914.tar patches-fcb510c541e83291ea6682cba87020a913c64914.tar.gz |
gnu: light: Install udev rules to allow sudo-less invocations.base-for-series-2733
* 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 <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r-- | gnu/packages/linux.scm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9b0dfd8eb7..5162dfff18 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))) |