unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: M <matf@disr.it>
To: 57731@debbugs.gnu.org
Cc: "\(" <paren@disroot.org>, M <matf@disr.it>
Subject: [bug#57731] [PATCH v4] gnu: Add batsignal.
Date: Sun, 11 Sep 2022 21:29:05 +0200	[thread overview]
Message-ID: <20220911192905.13238-1-matf@disr.it> (raw)
In-Reply-To: <20220911134305.14581-1-matf@disr.it>

* gnu/packages/monitoring.scm (batsignal): New variable.

Co-authored-by: ( <paren@disroot.org>
---
 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





  parent reply	other threads:[~2022-09-11 19:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11 13:43 [bug#57731] [PATCH 0/1] Add batsignal package M
2022-09-11 13:47 ` [bug#57731] [PATCH 1/1] gnu: Add batsignal M
2022-09-11 14:02   ` Liliana Marie Prikler
2022-09-11 14:31   ` Maxime Devos
2022-09-11 14:34 ` [bug#57731] [PATCH 0/1] Add batsignal package Maxime Devos
2022-09-11 16:12 ` [bug#57731] [PATCH v2] gnu: Add batsignal M
2022-09-11 19:16 ` [bug#57731] [PATCH 1/1] " M
2022-09-11 19:29 ` M [this message]
2022-09-11 19:32   ` [bug#57731] [PATCH v4] " ( via Guix-patches via
2022-09-11 19:42 ` [bug#57731] [PATCH v5] " M
2022-09-24 13:56   ` bug#57731: [PATCH 0/1] Add batsignal package Ludovic Courtès
2022-09-24 14:00     ` [bug#57731] " Mathieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220911192905.13238-1-matf@disr.it \
    --to=matf@disr.it \
    --cc=57731@debbugs.gnu.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).