unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 70267@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#70267] [PATCH] gnu: Add brillo.
Date: Sun,  7 Apr 2024 23:33:39 +0200	[thread overview]
Message-ID: <bc1fb43e3334228b88d234ccede507ce70a6887a.1712525619.git.goodoldpaul@autistici.org> (raw)

* gnu/packages/hardware.scm (brillo): New variable.

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

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





             reply	other threads:[~2024-04-07 21:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 21:33 Giacomo Leidi via Guix-patches via [this message]
2024-04-15 22:15 ` [bug#70267] QA review for 70267 Daniel Ziltener via Guix-patches via
2024-04-16 22:14 ` bug#70267: [PATCH] gnu: Add brillo Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc1fb43e3334228b88d234ccede507ce70a6887a.1712525619.git.goodoldpaul@autistici.org \
    --to=guix-patches@gnu.org \
    --cc=70267@debbugs.gnu.org \
    --cc=goodoldpaul@autistici.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).