me
/
guix
Archived
1
0
Fork 0

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 <efraim@flashner.co.il>
master
Amin Bandali 2020-01-27 09:33:37 -05:00 committed by Efraim Flashner
parent 61b95c15cf
commit fcb510c541
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 15 additions and 0 deletions

View File

@ -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)))