From patchwork Mon Mar 25 01:01:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vagrant Cascadian X-Patchwork-Id: 1568 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 7EAB016DDE; Mon, 25 Mar 2019 01:03:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 45F0916DDA for ; Mon, 25 Mar 2019 01:03:07 +0000 (GMT) Received: from localhost ([127.0.0.1]:34562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8E14-0004xf-K2 for patchwork@mira.cbaines.net; Sun, 24 Mar 2019 21:03:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8E11-0004xM-Ky for guix-patches@gnu.org; Sun, 24 Mar 2019 21:03:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8E10-0001d0-FL for guix-patches@gnu.org; Sun, 24 Mar 2019 21:03:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43766) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8E10-0001cw-Bp for guix-patches@gnu.org; Sun, 24 Mar 2019 21:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h8E10-00017p-6v for guix-patches@gnu.org; Sun, 24 Mar 2019 21:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#34985] [PATCH] gnu: Add brightnessctl. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Mar 2019 01:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34985@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15534757584285 (code B ref -1); Mon, 25 Mar 2019 01:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Mar 2019 01:02:38 +0000 Received: from localhost ([127.0.0.1]:57310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8E0b-000173-M6 for submit@debbugs.gnu.org; Sun, 24 Mar 2019 21:02:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8E0Z-00016p-In for submit@debbugs.gnu.org; Sun, 24 Mar 2019 21:02:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:51727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8E0U-0001Sc-9G for submit@debbugs.gnu.org; Sun, 24 Mar 2019 21:02:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8E0T-0004wR-3a for guix-patches@gnu.org; Sun, 24 Mar 2019 21:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8E0R-0001Rw-R3 for guix-patches@gnu.org; Sun, 24 Mar 2019 21:02:29 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:39750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8E0R-0001OW-HL for guix-patches@gnu.org; Sun, 24 Mar 2019 21:02:27 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 270DC1AA27 for ; Sun, 24 Mar 2019 18:02:23 -0700 (PDT) From: Vagrant Cascadian Date: Sun, 24 Mar 2019 18:01:51 -0700 Message-ID: <87ef6vhim8.fsf@ponder> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (brightnessctl): New variable. --- gnu/packages/linux.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d52e12f9cd..8e07d6a67e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4304,6 +4304,43 @@ set the screen to be pitch black at a vaĺue of 0 (or higher). Light is the successor of lightscript.") (license license:gpl3+))) +(define-public brightnessctl + (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c")) + (package + (name "brightnessctl") + (version (git-version "0.4" "0" commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Hummer12007/brightnessctl/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:make-flags (list "CC=gcc" + (string-append "PREFIX=" %output) + (string-append "UDEVDIR=" %output "/lib/udev/rules.d/")) + #:phases (modify-phases %standard-phases (delete 'configure) + (add-after 'unpack 'adjust-udev-rules + (lambda _ + (substitute* "90-brightnessctl.rules" + (("/bin/") "/run/current-system/profile/bin/")) + #t))))) + (home-page "https://github.com/Hummer12007/brightnessctl") + (synopsis "Backlight and LED brightness control") + (description + "This program allows you read and control device brightness. Devices +include backlight and LEDs. It can also preserve current brightness before +applying the operation, such as on lid close. + +The appropriate permissions must be set on the backlight or LED control +interface in sysfs, which can be accomplished with the included udev rules.") + (license license:expat)))) + (define-public tlp (package (name "tlp")