From patchwork Sun Apr 7 21:33:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: paul X-Patchwork-Id: 62835 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D9C5527BBE9; Sun, 7 Apr 2024 22:35:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 552EA27BBE2 for ; Sun, 7 Apr 2024 22:35:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtaAH-0001Kp-OX; Sun, 07 Apr 2024 17:35:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtaAE-0001KM-Ii for guix-patches@gnu.org; Sun, 07 Apr 2024 17:34:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtaAE-00067e-A5 for guix-patches@gnu.org; Sun, 07 Apr 2024 17:34:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtaAL-0008OJ-7H for guix-patches@gnu.org; Sun, 07 Apr 2024 17:35:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70267] [PATCH] gnu: Add brillo. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Apr 2024 21:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70267 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70267@debbugs.gnu.org Cc: Giacomo Leidi X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171252565632017 (code B ref -1); Sun, 07 Apr 2024 21:35:04 +0000 Received: (at submit) by debbugs.gnu.org; 7 Apr 2024 21:34:16 +0000 Received: from localhost ([127.0.0.1]:44904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rta9V-0008Jh-3s for submit@debbugs.gnu.org; Sun, 07 Apr 2024 17:34:15 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rta9S-0008JI-I9 for submit@debbugs.gnu.org; Sun, 07 Apr 2024 17:34:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rta9G-0001Cv-4N for guix-patches@gnu.org; Sun, 07 Apr 2024 17:33:58 -0400 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rta9D-00063d-Q5 for guix-patches@gnu.org; Sun, 07 Apr 2024 17:33:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1712525629; bh=mq6FkyiqglNVbhIxz3uudTIE/RWAgzTPqlNn9EJwvyE=; h=From:To:Cc:Subject:Date:From; b=HX//RbiCnwK/uqShrYQa/+804cUBFaLvrdumWfKt1xIBW1sx0I++SWNnmcROKMo2D 0G+2EpT24kt4d2pKQbxMw4x35yWYEl/pjarm8uetICvMpbbhNCjx29jXu1GdHzWo2Y POzuz+FvdBUm7v2l48qPjzXKNt8IRkbBSVQ3XZSU= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4VCQT91yBNz11Pv; Sun, 7 Apr 2024 21:33:49 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4VCQT91BGRz11P9; Sun, 7 Apr 2024 21:33:49 +0000 (UTC) Date: Sun, 7 Apr 2024 23:33:39 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=93.190.126.19; envelope-from=goodoldpaul@autistici.org; helo=confino.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches X-Patchwork-Original-From: Giacomo Leidi via Guix-patches via From: paul Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/hardware.scm (brillo): New variable. Change-Id: Ic66118b9b792b0bc81bbeffb72236953da0f0772 --- gnu/packages/hardware.scm | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) base-commit: 69951a61a1d8f1f2135ea2dc836738be282b97bc 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 ;;; Copyright © 2023 Spencer Skylar Chan ;;; Copyright © 2023 Foundation Devices, Inc. +;;; Copyright © 2024 Giacomo Leidi ;;; ;;; 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")