From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 uK0sCTAdHmOtKwAAbAwnHQ (envelope-from ) for ; Sun, 11 Sep 2022 19:38:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UOoCCTAdHmNPeAAAauVa8A (envelope-from ) for ; Sun, 11 Sep 2022 19:38:56 +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 D146E1C0ED for ; Sun, 11 Sep 2022 19:38:55 +0200 (CEST) Received: from localhost ([::1]:51724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXQv0-0003MD-Qy for larch@yhetil.org; Sun, 11 Sep 2022 13:38:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXQuA-0003Jd-CM for guix-patches@gnu.org; Sun, 11 Sep 2022 13:38:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXQuA-0005OH-36 for guix-patches@gnu.org; Sun, 11 Sep 2022 13:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXQu9-0006ni-Vv for guix-patches@gnu.org; Sun, 11 Sep 2022 13:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57734] [PATCH] gnu: Add batsignal. References: <20220911173540.10825-1-matf@disr.it> In-Reply-To: <20220911173540.10825-1-matf@disr.it> Resent-From: M Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Sep 2022 17:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57734 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57734@debbugs.gnu.org Cc: M Received: via spool by 57734-submit@debbugs.gnu.org id=B57734.166291785926112 (code B ref 57734); Sun, 11 Sep 2022 17:38:01 +0000 Received: (at 57734) by debbugs.gnu.org; 11 Sep 2022 17:37:39 +0000 Received: from localhost ([127.0.0.1]:43334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXQtm-0006n5-N1 for submit@debbugs.gnu.org; Sun, 11 Sep 2022 13:37:39 -0400 Received: from knopi.disroot.org ([178.21.23.139]:40730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXQtk-0006mx-Do for 57734@debbugs.gnu.org; Sun, 11 Sep 2022 13:37:37 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id BF83049FB1; Sun, 11 Sep 2022 19:37:35 +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 XkrrAxnDwMES; Sun, 11 Sep 2022 19:37:34 +0200 (CEST) From: M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disr.it; s=mail; t=1662917852; bh=4QeQuCgYzDmzzLe5y9XlXKH2SJ/dVVERBkP7ttD66l4=; h=From:To:Cc:Subject:Date; b=j5kxrRDIXWkaHBwx7jwOAkfiJI+8wZ8XuRFs0hjlxxuA72xjKXFjFUR6qhxJsuUYY kmXHuzRboENqMenK+R+xhiVmhdAA1z+WT1W2qeingyE5/S2Nx/RFLlRU0PN3WTAfdG jL/YgEonS0/JmNho1lv7wpoqdwt+rz1unIworcRkje++5Z+OP5TAlPlQn2WMXr9x00 l1s11xnDEeApfX3szFIgomTjMLOVq5+3KTgCjsNHnqLuQX44I3KHGlSos1qkQ9OcJr IBvTPTShx+gzzEMENk5YhN3YUra1bWT7TSSQGf68d9tpEEYyANWdROEq1u9afAQN1C xVv2S8BFexGrA== Date: Sun, 11 Sep 2022 19:37:25 +0200 Message-Id: <20220911173726.14214-1-matf@disr.it> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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=1662917935; h=from:from:sender:sender: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: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=N3jv2wzc9QfX8AR7dDx3sThG9EtKIcJNG7tZjNFZRek=; b=cGhInrgqbtfbsKRDK58NfyjExDZCP16/8x+8sN1Pcx59346YD4wW7SCVACuB8yiqluAztW jRjvttteymyayUJ+A9qt+IhbSv+EiStJ+nlyxZKrvkLR6oFpiMB6yedWjXaKMcjKoFxs3G b1gJs1wv2QZ9O0nJn8UikWWK8YTxsNMJ1XALjg3KI99seKnNYeuSpPEgbH6qGXaHpU4aqp 7DXlYlMMk8gGxCfM35lfmQb6LzLVCl8CjF/3VGynW34vx0/0D2Aza/uHL+fB0NP918RHsA wVtgqJwsuNTP7whPnICDaz99IxpU4d1PkgRjV32okG3CIT57xJvdDWh1wUayKw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662917935; a=rsa-sha256; cv=none; b=ADQiau3HKXIrq/aBBzDxDezFBwJfTQQKO+EHlJbvqgDCH+dYkGTyrUsTZe+Bac0J0d6kuh gGnpboYQwC+zj0PPzT6Pyz5X3Sr4J7S04oXXfVpTRqYy5TxaHE4063xF/T49YJkIJ7Ez0+ SvK5epE2a1SSI3ukQnruDp5PF4qIrPO4Xex1+FWMS8bsjwibXVyh4yqrOdQY6PWKD22rGo QVH7eRVUkXkaYBXeKh/td//e0iBYD3zfRBDDCyGdGFDPO6LnNN/+nD6y5jDZdmm4f4ta1v Fv3qZQRODeqfHXDBk/KVPSIZdPBRf27oONkfRqh7cGLKvqa0BKnYhNvn59gb7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disr.it header.s=mail header.b=j5kxrRDI; 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: 7.70 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disr.it header.s=mail header.b=j5kxrRDI; 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: D146E1C0ED X-Spam-Score: 7.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0MIJNGthK8Vw * gnu/packages/monitoring.scm (batsignal): New variable. Co-authored by unmatched-paren and matf --- gnu/packages/monitoring.scm | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 47845700ee..459b8d8539 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -12,6 +12,8 @@ ;;; Copyright © 2021 Raphaël Mélotte ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 Hartmut Goebel +;;; Copyright © 2022 ( +;;; Copyright © 2022 Mathieu Laparie ;;; ;;; This file is part of GNU Guix. ;;; @@ -50,6 +52,7 @@ (define-module (gnu packages monitoring) #:use-module (gnu packages django) #:use-module (gnu packages gd) #:use-module (gnu packages gettext) + #:use-module (gnu packages gnome) #:use-module (gnu packages image) #:use-module (gnu packages mail) #:use-module (gnu packages ncurses) @@ -764,3 +767,45 @@ (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