[PATCH] gnu: Add brillo.

  • Done
  • quality assurance status badge
Details
3 participants
  • Daniel Ziltener
  • Giacomo Leidi
  • Christopher Baines
Owner
unassigned
Submitted by
Giacomo Leidi
Severity
normal

Debbugs page

G
G
Giacomo Leidi wrote on 7 Apr 14:33 -0700
(address . guix-patches@gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
bc1fb43e3334228b88d234ccede507ce70a6887a.1712525619.git.goodoldpaul@autistici.org
* gnu/packages/hardware.scm (brillo): New variable.

Change-Id: Ic66118b9b792b0bc81bbeffb72236953da0f0772
---
gnu/packages/hardware.scm | 61 +++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (90 lines)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 72b6decd81..0d559ca714 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 Spencer Skylar Chan <schan12@umd.edu>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
+;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -60,6 +61,7 @@ (define-module (gnu packages hardware)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages haskell-xyz)
@@ -141,6 +143,65 @@ (define-public envytools
sets, and tools to deal with register databases.")
(license license:expat))))
+(define-public brillo
+ (package
+ (name "brillo")
+ (version "1.4.12")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/cameronnemo/brillo")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "16n4j45mfhd1zxwbpl8342vyqf8rj3plhcl90xp02m46hn58v8bl"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target))
+ (string-append "AADIR=" #$output "/etc/apparmor.d")
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-udev-rules
+ (lambda _
+ (substitute* "contrib/udev.in"
+ (("/bin/chgrp")
+ (string-append #$coreutils
+ "/bin/chgrp"))
+ (("/bin/chmod")
+ (string-append #$coreutils
+ "/bin/chmod")))))
+ (delete 'configure)
+ ;; Tests must be run on real hardware.
+ (delete 'check)
+ (add-after 'install 'install-udev-polkit
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (map (lambda (target)
+ (apply invoke "make" target make-flags))
+ '("install.udev" "install.polkit")))))))
+ (native-inputs (list go-github-com-go-md2man))
+ (home-page "https://gitlab.com/cameronnemo/brillo")
+ (synopsis "Controls the brightness of backlight and LED devices on Linux")
+ (description
+ "Brillo can control the brightness of backlight and LED devices on Linux.
+
+Notable features include:
+
+@itemize
+
+@item Automatic best controller detection
+@item Smooth transitions and natural brightness adjustments
+@item Ability to save and restore brightness across boots
+@item Directly using sysfs to set brightness without relying on X
+@item Unprivileged access with no new setuid binaries
+@item Containment with AppArmor
+
+@end itemize")
+ (license (list license:bsd-0 license:gpl3+))))
+
(define-public hw-probe
(package
(name "hw-probe")

base-commit: 69951a61a1d8f1f2135ea2dc836738be282b97bc
--
2.41.0
D
D
Daniel Ziltener wrote on 15 Apr 15:15 -0700
QA review for 70267
b1ac51cd-107d-faa1-03b9-2d1119d3da4a@lyrion.ch
user guix
usertag 70267 + reviewed-looks-good
thanks

Guix QA review form submission:


Items marked as checked: Lint warnings, Package builds, Commit messages,
New package licenses, New package tests, New package synopsis and
descriptions
C
C
Christopher Baines wrote on 16 Apr 15:14 -0700
Re: [bug#70267] [PATCH] gnu: Add brillo.
87y19dt0o3.fsf@cbaines.net
Giacomo Leidi via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (7 lines)
> * gnu/packages/hardware.scm (brillo): New variable.
>
> Change-Id: Ic66118b9b792b0bc81bbeffb72236953da0f0772
> ---
> gnu/packages/hardware.scm | 61 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)

Thanks both, I tweaked the description to add more details and make it
not just a direct copy of the upstream README. I also specified the
supported systems since I guess there's no point building this for the
hurd.

I've pushed it to master as e5e8b4e52d2402225c89421d12bbaf96e3c5c8fd.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYe+FxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xej1w/+KSceeNOuxfjgTT82izWNX2+6TJwcma4Q
nCHj5qUwr6cGG9eVfgF8V2LC9DCyQA5zDyaJ64BMF3oV127F2LXqcAm6T1esFzIm
tqvqyDkGTlKjG68IBSfTCyhKEh4eypbwQP5E+tp+TrEOfTIOSMML6CcgPw1hcDJP
Zml8l0g7N6Oja2et7gLqXdYVDeiY4048lwToJQ1azNcJco+pyrMhAixR9HwhoLHc
wpkuUUKdaUriTSFa9wxSR5GgdPLXMvfsWcTDJ79qbjAnoV5198/vs/ppkowKPnRh
+nwd/+UocVETGoMtI1Q3CQLTZd/hXrYcjeMNRHqEVvNF/PvNIEiQZ1q7BC3ELPob
/mXn0RsR33P2EnZoAMm1Yag9LyPdTYH/X1FM6r7h0C9CMnV8TjXn5HQikdy/NfXT
EetsdMCMcNPFbiJF6bMb4ZIL85q8m94W+Mk2g1a9zG1aGwsTldXN5eItcbueadzz
GOXHXamh6q58ERwxYTVFbzMpUXs2U9NPUHgKn2HT8ziZnx/OWMpAxq5gFT46Lj8M
T88Lf3QEuk9vkMZ1IZ4qp8XYzvbR+h/tTBw1XYkbsqVLFHXOByuOGrS1H5FfH5YU
AhEJGFYdH/Ak1VLi1BiaKbnwdQP+gzzdgP0rcxRyzoR1v4L+sRaYjpOsJdRL6rj+
7DFQFILOIsU=
=8+r6
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 70267@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70267
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch