From unknown Mon Aug 18 11:25:13 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35679] [PATCH 3/3] gnu: Add tpacpi-bat. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 May 2019 21:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35679 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35679@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155752373712278 (code B ref -1); Fri, 10 May 2019 21:29:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 May 2019 21:28:57 +0000 Received: from localhost ([127.0.0.1]:39293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPD4b-0003By-1V for submit@debbugs.gnu.org; Fri, 10 May 2019 17:28:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPD4W-0003BK-1i for submit@debbugs.gnu.org; Fri, 10 May 2019 17:28:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:34841) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPD4Q-0004ZM-U4 for submit@debbugs.gnu.org; Fri, 10 May 2019 17:28:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPD4P-0002fA-Ja for guix-patches@gnu.org; Fri, 10 May 2019 17:28:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPD4O-0004Xj-5B for guix-patches@gnu.org; Fri, 10 May 2019 17:28:45 -0400 Received: from tobias.gr ([2001:470:7405::1]:53610) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPD4N-0004Un-QR for guix-patches@gnu.org; Fri, 10 May 2019 17:28:44 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id d5a5dd38 for ; Fri, 10 May 2019 21:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=2018; i=me@tobias.gr; bh=MWK1rOPBOdgPzauzQbFTzYczFhFYoKcJn8Hq1HS+AN0=; b=hEdwOoTMLzxZ zhWBXSl3UaQeCdTXQS7tJ+SLCoDsN2z+qwO0bA651kQrLlb6Z/feOkD4zaUQ6Gwm p62ODWbqtqbStl4ImgKDZpX4lGQroJKiiVKw6ZfwZYzgeAqbjyhMIKMaX/SWwaoq mOOhY924Pp5gr56bEh5oLV7kuwSl9fGF1wA7Mrc+vG9wujcTcqRznGK5mNT9ctuX +NJwAbLUvfJ1Ui7ekHIWpS5AtAKu3Vcgv4B1JXnTI1wVhlO5XObY0o+4BabeF4v0 6TRLk0xnwi4BbQ6ACUzNfP6vL2Ad9iqg4io52xDDa9qldhmAI6012Na+XWiygdss pjL1noGkHA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id e12c2a50 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 10 May 2019 21:28:39 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Fri, 10 May 2019 23:28:18 +0200 Message-Id: <20190510212818.7996-3-me@tobias.gr> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190510212818.7996-1-me@tobias.gr> References: <35676@debbugs.gnu.org> <20190510212818.7996-1-me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:7405::1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * gnu/packages/linux.scm (tpacpi-bat): New public variable. --- Same. gnu/packages/linux.scm | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9689a89cc9..080a8b228b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3748,6 +3748,68 @@ other @code{hwmon} driver that enables temperature reading and fan control from userspace.") (license license:gpl3+))) +(define-public tpacpi-bat + (package + (name "tpacpi-bat") + (version "3.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/teleshoes/tpacpi-bat.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test target + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'refer-to-inputs + (lambda _ + (substitute* "tpacpi-bat" + (("cat ") + (format "~a " (which "cat"))) + ;; tpacpi-bat modprobes the acpi_call kernel module if it's not + ;; loaded. That's the administrator's prerogative; disable it. + (("system \"(modprobe .*)\"" _ match) + (format "die \"Please run ‘~a’ first.\\n\"" match))) + #t)) + (delete 'configure) ; nothing to configure + (delete 'build) ; nothing to build + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append out "/share/doc/" ,name "-" ,version))) + (install-file "tpacpi-bat" bin) + + ;; There's no man page. Install other forms of documentation. + (for-each (lambda (file) + (let ((target (string-append doc "/" file))) + (mkdir-p (dirname target)) + (copy-recursively file target))) + (list "battery_asl" "examples" "README.md")) + #t)))))) + (inputs + `(("perl" ,perl))) + (home-page "https://github.com/teleshoes/tpacpi-bat") + (synopsis "ThinkPad battery charge controller") + (description + "Tpacpi-bat is a command-line interface to control battery charging on +@uref{https://github.com/teleshoes/tpacpi-bat/wiki/Supported-Hardware, Lenovo +ThinkPad models released after 2011}, starting with the xx20 series. It can +query and set the thresholds at which one or both batteries will start and stop +charging, inhibit charging batteries for a set period of time, or force them to +discharge when they otherwise would not. + +This tool merely exposes ACPI calls provided by the @code{acpi_call} Linux +kernel module provided by the @code{acpi-call-linux-module} package, which must +be installed and loaded separately. Only the original vendor firmware is +supported.") + (license license:gpl3+))) + (define-public ntfs-3g (package (name "ntfs-3g") -- 2.21.0 From debbugs-submit-bounces@debbugs.gnu.org Fri May 10 17:32:21 2019 Received: (at control) by debbugs.gnu.org; 10 May 2019 21:32:22 +0000 Received: from localhost ([127.0.0.1]:39306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPD7t-0003JQ-M5 for submit@debbugs.gnu.org; Fri, 10 May 2019 17:32:21 -0400 Received: from tobias.gr ([80.241.217.52]:36390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPD7q-0003JG-PY for control@debbugs.gnu.org; Fri, 10 May 2019 17:32:19 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 34eda3cf for ; Fri, 10 May 2019 21:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :date:message-id:mime-version:content-type; s=2018; i= me@tobias.gr; bh=385kITL62gW/Q6llzPQ3CZzZX9UH8A2JX7YrSV3+8U8=; b= QQMPSIyt3dA/9QXi8mdWKBurq0PuaW5GzpCI6TSoD/19iczqxRFUzs1azE3GUH9Y biI1ys4/JHbGHzrpxKDASBDJgAHNYEXhZ9dzhnOGJZuJFT127FnR62hJKglenjIU UQ3nS5pzG8sqlqzwv/MUfXcsyXd1puCFyu5zMnjrBbVEo3xMi+VVacqiq/lIcyGx Jyx0/nYtQA+p3L3HvBpyBekOP8hw2mZyXrNPG66dZvULiSodAwtkqD1JC3pWqBGN 1VG7o6THBy7O5JG6XhFBH1MvZUTdDSgxWImJkISu+fLbkVPaekH5Tk1gs5x/QVgI /qkku0trepWj4RctaeIhfw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id c30e6c9d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 10 May 2019 21:32:16 +0000 (UTC) From: Tobias Geerinckx-Rice To: GNU bug tracker automated control server Date: Fri, 10 May 2019 23:32:16 +0200 Message-ID: <878sveyp0f.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) --=-=-= Content-Type: text/plain; format=flowed merge 35677 35679 merge 35677 35678 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXNXt4AAKCRANsP+IT1Vt eXp5AQC8K+eYPRTSB0Nm9pjoC6b+GZt740VfpoW7m4GzOwxeSgEA2moCbkgoHAJ+ AMDCxeTUBD61l+Zy/INp//7PSvlcJA0= =wjvl -----END PGP SIGNATURE----- --=-=-=--