From patchwork Sat Feb 12 17:21:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 37216 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 8170427BBEA; Sat, 12 Feb 2022 17:22:28 +0000 (GMT) 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 3EA7E27BBE9 for ; Sat, 12 Feb 2022 17:22:28 +0000 (GMT) Received: from localhost ([::1]:34860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIw6M-0001ZZ-Kw for patchwork@mira.cbaines.net; Sat, 12 Feb 2022 12:22:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIw5y-0001Yw-Jz for guix-patches@gnu.org; Sat, 12 Feb 2022 12:22:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIw5y-0003RD-A9 for guix-patches@gnu.org; Sat, 12 Feb 2022 12:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nIw5y-00072F-75 for guix-patches@gnu.org; Sat, 12 Feb 2022 12:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53953] [PATCH v2] gnu: Add acpilight. References: <20220212104432.22611-1-brice@waegenei.re> In-Reply-To: <20220212104432.22611-1-brice@waegenei.re> Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Feb 2022 17:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53953 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: maximedevos@telenet.be Cc: 53953@debbugs.gnu.org Received: via spool by 53953-submit@debbugs.gnu.org id=B53953.164468649726984 (code B ref 53953); Sat, 12 Feb 2022 17:22:02 +0000 Received: (at 53953) by debbugs.gnu.org; 12 Feb 2022 17:21:37 +0000 Received: from localhost ([127.0.0.1]:35559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIw5Z-00071A-8i for submit@debbugs.gnu.org; Sat, 12 Feb 2022 12:21:37 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:48129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIw5W-00070u-OF for 53953@debbugs.gnu.org; Sat, 12 Feb 2022 12:21:36 -0500 Received: (Authenticated sender: brice@waegenei.re) by mail.gandi.net (Postfix) with ESMTPSA id 29B1320002; Sat, 12 Feb 2022 17:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waegenei.re; s=gm1; t=1644686488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YZZMfmTB6PdLZ4C4p5cb+t4gXcFGQLcqOQj/5cLJWQ=; b=iGZ3VaU5ZZwReUL0/PsZ6ra/d85YjHO5pg1ThjBx56f6LPfJgLxRHXbHyPyQOB9/eZazkn eHycikh46hfvl84FVrLTI9dxzBX88qTnaLJ5N1+f00G4bZvHcFo2Y8VMCYAflOSaO/sWmk 7vKrZ8UxKLB7PeVO1VKWYfZ4Sr7bX9+ZWSM6dD7t/oVOKofVA01Xtv6n99StgMz/qIHE5D rNRf+pcUHdB+vOM1MnILrEKyFBJ7Kse8NU8m5PJ4mIEhBwAHGygLhSOElZO2ifbQopQUwH yMcLZkJH0qe81iapLzyNO8T0c70+c8oK4ssY7Q9Mliqji7fWtFt82Nn00+Z9vQ== From: Brice Waegeneire Date: Sat, 12 Feb 2022 18:21:25 +0100 Message-Id: <20220212172125.3648-1-brice@waegenei.re> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (acpilight): New variable. --- Maxime, Thanks for the review. I should have re-read this old package more throughly, I have fixed what you pointed out: - using gexp in arguments field - don't returning #t in phases - adding coreutils-minimal to inputs As for the odd make-flags, this is because of the uncanonical Makefile¹ of acpilight, It don't build with an empty DESTDIR. ¹ https://gitlab.com/wavexx/acpilight/-/blob/master/Makefile Cheers, - Brice gnu/packages/linux.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) base-commit: e641d707e1ec8de2bfc658dcd1757360300aa509 diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index bcbaa2166d..fe88d9ad26 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -35,7 +35,7 @@ ;;; Copyright © 2019 Tim Gesthuizen ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović -;;; Copyright © 2019, 2020, 2021 Brice Waegeneire +;;; Copyright © 2019-2022 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau ;;; Copyright © 2020, 2021 Oleg Pykhalov ;;; Copyright © 2020 Pierre Neidhardt @@ -8806,3 +8806,41 @@ (define-public libgpiod (license (list license:lgpl2.1+ ;; libgpiod license:gpl2+ ;; gpio-tools license:lgpl3+)))) ;; C++ bindings + +(define-public acpilight + (package + (name "acpilight") + (version "1.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/wavexx/acpilight.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1r0r3nx6x6vkpal6vci0zaa1n9dfacypldf6k8fxg7919vzxdn1w")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;no tests + #:make-flags #~(list "prefix=" + (string-append "DESTDIR=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile" + (("udevadm") "true")) + (substitute* "90-backlight.rules" + (("/bin") + (string-append (assoc-ref inputs "coreutils-minimal") "/bin")))))))) + (inputs + (list python coreutils-minimal)) + (home-page "https://gitlab.com/wavexx/acpilight") + (synopsis "Backward-compatibile xbacklight replacement") + (description "acpilight is a backward-compatibile replacement for +xbacklight that uses the ACPI interface to set the display +brightness. On modern laptops acpilight can control both display and +keyboard backlight uniformly on either X11, the console or Wayland.") + (license license:gpl3+)))