From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6BkBG2M3HmNAEwEAbAwnHQ (envelope-from ) for ; Sun, 11 Sep 2022 21:30:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oGAMG2M3HmPoggEA9RJhRA (envelope-from ) for ; Sun, 11 Sep 2022 21:30:43 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 30BAB1E20A for ; Sun, 11 Sep 2022 21:30:43 +0200 (CEST) Received: from localhost ([::1]:41812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXSfC-0004sF-0T for larch@yhetil.org; Sun, 11 Sep 2022 15:30:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXSeY-0004s5-IY for guix-patches@gnu.org; Sun, 11 Sep 2022 15:30:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXSeY-00043b-9G for guix-patches@gnu.org; Sun, 11 Sep 2022 15:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXSeY-0003Sz-05 for guix-patches@gnu.org; Sun, 11 Sep 2022 15:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57731] [PATCH v4] gnu: Add batsignal. References: <20220911134305.14581-1-matf@disr.it> In-Reply-To: <20220911134305.14581-1-matf@disr.it> Resent-From: M Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Sep 2022 19:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57731 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57731@debbugs.gnu.org Cc: "\(" , M Received: via spool by 57731-submit@debbugs.gnu.org id=B57731.166292456613259 (code B ref 57731); Sun, 11 Sep 2022 19:30:01 +0000 Received: (at 57731) by debbugs.gnu.org; 11 Sep 2022 19:29:26 +0000 Received: from localhost ([127.0.0.1]:43583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXSdy-0003Rn-3J for submit@debbugs.gnu.org; Sun, 11 Sep 2022 15:29:26 -0400 Received: from knopi.disroot.org ([178.21.23.139]:59480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXSds-0003Rc-VS for 57731@debbugs.gnu.org; Sun, 11 Sep 2022 15:29:24 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2E57249FE3; Sun, 11 Sep 2022 21:29:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C9HlKazRVodz; Sun, 11 Sep 2022 21:29:18 +0200 (CEST) From: M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disr.it; s=mail; t=1662924558; bh=omwSQ82hFluwndpkP4l2ZmV82R03AbQZN0z93BqNLSk=; h=From:To:Cc:Subject:Date; b=tfbOhBfpjcxP4yeLAnci9FjuNj2UZHNYcUPDNWpedEgoOZtohZgk5dwolnQJVj+rr yp6YDC6+kAdZevQJYddPC2Cnu5MQuhRxOVBilgygvytU6HuaZ8ZAVmW0ZG0APB7K75 +N+c1Bw74pdRCFGQoxu51ZuHbhQQcCIGaRHlfTC6Ugin7L24fBa9LBJglXAjsi0w6w nOevHNla5I1Y/1cRqiZRbGUbU0z4T1xyPHrE84jcLctAtG/15Y3ILJbf6zS8RSzIRH 7ttopzYCPHnzeCs0u9JwcMPxuPI8p6u0g8vLEaSejZMOZf7bOG/ppnywrvGneWIgpQ H2iIO9BbnzglQ== Date: Sun, 11 Sep 2022 21:29:05 +0200 Message-Id: <20220911192905.13238-1-matf@disr.it> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662924643; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=PWiD0rYjaBxeU4FW29DAxpI5P8dlioiDg0HMdXkkCm8=; b=hsEYoEYLxLcIEj3XHvL5pw9X6P0zG0c7ATLM4C3y0p+6X4xevXX9elcT2J321J+Uv+yxHU EhabIx7G+/OdqI9b9QfK2c5c5sX5YXzFh1U8HoLnpktv7trhaDyvzUR5M3CSH/1TDW+q50 RNt1OZeSLn7nNiRZa0gXhsBMumftuJubiyK3B9w7HHAd6CQXD1t2BfFtDYWlBJaTjpUimX GNh92IMI2fTjEMxTrGYmcNgtDxC2jWVbr17AzB8GxSjj1U7A5YJPrBhWAVLAGLOsZ/jSjS +rVx/fBY51pgA5P+RpcdpUhBKTqbOTanVrfX6T5oHOzqPQdWgK+dCiXgavIvtw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662924643; a=rsa-sha256; cv=none; b=V290VZ/U2lFI30JExq2bD8wCHVlHCpVr29clzscUMFC7P0xvSPVJmsJrXG07ODDlThGtD3 NR5gvhvKjB3fnS/w9bvMSELZgU4abLT1neACIsW6VRq9THK8gUTDBsyDuZxvDUuD/dzrX9 dVYM+cwKirfsAl7yc3Agpsjj8trwiSMBIsjQOuIfmQgzhkmSAYxvqPWCvJOysPgIL39et5 0rYhdIpdmlBic+Dl1vWjWHgqg8VkV0rq+NAKYJrpq6s1zY8Ka3cT4DxV3XTzSLf65TZti0 HTLq4FUNr9Ij/oeYIVvrPmuH3bCxYtfOuqdtNo8E6nAZ5J9YtpgdaTTCh8+YLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disr.it header.s=mail header.b=tfbOhBfp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disr.it (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 8.20 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disr.it header.s=mail header.b=tfbOhBfp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disr.it (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 30BAB1E20A X-Spam-Score: 8.20 X-Migadu-Spam: Yes X-Migadu-Scanner: scn1.migadu.com X-TUID: NW6bSaMS/sdA * gnu/packages/monitoring.scm (batsignal): New variable. Co-authored-by: ( --- gnu/packages/monitoring.scm | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 47845700ee..608973f9c2 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -764,3 +764,46 @@ (define-public python-statsd (description "StatsD is a friendly front-end to Graphite. This package provides a simple Python client for the StatsD daemon.") (license license:expat))) + +(define-public batsignal + (package + (name "batsignal") + (version "1.6.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/electrickite/batsignal") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0b1j6mljnqgxwr3id3r9shzhsjk5r0qdh9cxkvy1dm4kzbyc4dxq")))) + (build-system gnu-build-system) + (arguments + (list #:make-flags + #~(list (string-append "PREFIX=" #$output) + (string-append "CC=" #$(cc-for-target))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-cross-compile + (lambda _ + (substitute* "Makefile" + (("pkg-config") + #$(pkg-config-for-target))))) + (delete 'configure) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./batsignal" "-v"))))))) + (inputs (list libnotify)) + (native-inputs (list pkg-config)) + (home-page "https://github.com/electrickite/batsignal") + (synopsis "Power monitoring tool") + (description + "This package provides a daemon that monitors device power levels, +notifying the user and optionally running a command when it reaches +user-configured power thresholds. This can be used to force powering off a +laptop when the battery gets below critical levels, instead of damaging the +battery.") + (license license:isc))) + -- 2.37.2