1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2021, 2021 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
4 ;;; Copyright © 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
7 ;;; Copyright © 2018, 2019, 2020 Oleg Pykhalov <go.wigust@gmail.com>
8 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
9 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
10 ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
11 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
12 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
13 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
14 ;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
15 ;;; Copyright © 2022 ( <paren@disroot.org>
16 ;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages monitoring)
34 #:use-module (guix gexp)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix build-system perl)
40 #:use-module (guix build-system python)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system go)
43 #:use-module (guix utils)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages admin)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages django)
53 #:use-module (gnu packages gd)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages gnome) ;libnotify
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages mail)
58 #:use-module (gnu packages ncurses)
59 #:use-module (gnu packages networking)
60 #:use-module (gnu packages libevent)
61 #:use-module (gnu packages pcre)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-build)
66 #:use-module (gnu packages python-web)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages rrdtool)
69 #:use-module (gnu packages sphinx)
70 #:use-module (gnu packages time)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages web))
78 ;; XXX: Nagios 4.2.x and later bundle a copy of AngularJS.
82 "mirror://sourceforge/nagios/nagios-4.x/nagios-"
83 version "/nagios-" version ".tar.gz"))
86 "1x5hb97zbvkm73q53ydp1gwj8nnznm72q9c4rm6ny7phr995l3db"))
87 (modules '((guix build utils)))
89 ;; Ensure reproducibility.
91 (substitute* (find-files "cgi" "\\.c$")
92 (("__DATE__") "\"1970-01-01\"")
93 (("__TIME__") "\"00:00:00\""))
95 (build-system gnu-build-system)
100 ("libpng-apng" ,libpng)
103 ("mailutils" ,mailutils)))
105 '(#:configure-flags (list "--sysconfdir=/etc"
107 ;; 'include/locations.h.in' defines file
108 ;; locations, and many things go directly under
109 ;; LOCALSTATEDIR, hence the extra '/nagios'.
110 "--localstatedir=/var/nagios"
114 (assoc-ref %build-inputs "mailutils")
116 #:make-flags '("all")
117 #:phases (modify-phases %standard-phases
118 (add-before 'build 'do-not-chown-to-nagios
120 ;; Makefiles do 'install -o nagios -g nagios', which
121 ;; doesn't work for us.
122 (substitute* (find-files "." "^Makefile$")
123 (("-o nagios -g nagios")
126 (add-before 'build 'do-not-create-sysconfdir
128 ;; Don't try to create /var upon 'make install'.
129 (substitute* "Makefile"
130 (("\\$\\(INSTALL\\).*\\$\\(LOGDIR\\).*$" all)
131 (string-append "# " all))
132 (("\\$\\(INSTALL\\).*\\$\\(CHECKRESULTDIR\\).*$" all)
133 (string-append "# " all))
134 (("chmod g\\+s.*" all)
135 (string-append "# " all)))
137 (add-before 'build 'set-html/php-directory
139 ;; Install HTML and PHP files under 'share/nagios/html'
140 ;; instead of just 'share/'.
141 (substitute* '("html/Makefile" "Makefile")
143 "HTMLDIR = $(datarootdir)/nagios/html\n"))
145 #:tests? #f)) ;no 'check' target or similar
146 (home-page "https://www.nagios.org/")
147 (synopsis "Host, service, and network monitoring program")
149 "Nagios is a host, service, and network monitoring program written in C.
150 CGI programs are included to allow you to view the current status, history,
151 etc. via a Web interface. Features include:
154 @item Monitoring of network services (via SMTP, POP3, HTTP, PING, etc).
155 @item Monitoring of host resources (processor load, disk usage, etc.).
156 @item A plugin interface to allow for user-developed service monitoring
158 @item Ability to define network host hierarchy using \"parent\" hosts,
159 allowing detection of and distinction between hosts that are down
160 and those that are unreachable.
161 @item Notifications when problems occur and get resolved (via email,
162 pager, or user-defined method).
163 @item Ability to define event handlers for proactive problem resolution.
164 @item Automatic log file rotation/archiving.
165 @item Optional web interface for viewing current network status,
166 notification and problem history, log file, etc.
168 (license license:gpl2)))
170 (define-public zabbix-agentd
172 (name "zabbix-agentd")
178 "https://cdn.zabbix.com/zabbix/sources/stable/"
179 (version-major+minor version) "/zabbix-" version ".tar.gz"))
181 (base32 "0ijf5d0kl2wb6amlz3bqfh7xg4wy00n1prislhszclj01sn0gy1g"))
182 (modules '((guix build utils)))
184 '(substitute* '("src/zabbix_proxy/proxy.c"
185 "src/zabbix_server/server.c")
186 ;; 'fping' must be setuid, so look for it in the usual location.
187 (("/usr/sbin/fping6?")
188 "/run/setuid-programs/fping")))))
189 (build-system gnu-build-system)
192 '("--enable-agent" "--enable-ipv6" "--with-libpcre2")))
197 (home-page "https://www.zabbix.com/")
198 (synopsis "Distributed monitoring solution (client-side agent)")
199 (description "This package provides a distributed monitoring
200 solution (client-side agent)")
201 (license license:gpl2+)
203 '((release-monitoring-url . "https://www.zabbix.com/download_sources")
204 (upstream-name . "zabbix")))))
206 (define-public zabbix-server
208 (inherit zabbix-agentd)
209 (name "zabbix-server")
210 (outputs '("out" "front-end" "schema"))
212 (substitute-keyword-arguments (package-arguments zabbix-agentd)
213 ((#:phases phases '%standard-phases)
214 #~(modify-phases #$phases
215 (add-after 'install 'install-front-end
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let* ((php (string-append (assoc-ref outputs "front-end")
218 "/share/zabbix/php"))
219 (front-end-conf (string-append php "/conf"))
220 (etc (string-append php "/etc")))
222 (copy-recursively "ui" php)
223 ;; Make front-end read config from ‘/etc/zabbix’ directory.
224 (rename-file front-end-conf
225 (string-append front-end-conf "-example"))
226 (symlink "/etc/zabbix" front-end-conf))))
227 (add-after 'install 'install-schema
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((database-directory
230 (string-append (assoc-ref outputs "schema")
232 (for-each delete-file
233 (find-files "database" "Makefile\\.in|\\.am$"))
234 (mkdir-p database-directory)
235 (copy-recursively "database" database-directory))))))
236 ((#:configure-flags flags ''())
237 #~(append (list "--enable-server"
239 (string-append "--with-libevent="
240 (assoc-ref %build-inputs "libevent"))
242 (string-append "--with-gnutls="
243 (assoc-ref %build-inputs "gnutls"))
245 (string-append "--with-zlib="
246 (assoc-ref %build-inputs "zlib")))
247 (delete "--enable-agent" #$flags)))))
249 (modify-inputs (package-inputs zabbix-agentd)
256 (synopsis "Distributed monitoring solution (server-side)")
257 (description "This package provides a distributed monitoring
258 solution (server-side)")))
260 (define-public zabbix-cli
267 (url "https://github.com/unioslo/zabbix-cli")
269 (file-name (git-file-name name version))
272 "1p8xkq3mxg476srwrgqax76vjzji0rjx32njmgnpa409vaqrbj5p"))))
273 (build-system python-build-system)
276 #~(modify-phases %standard-phases
277 (add-after 'unpack 'use-absolute-ncurses
278 (lambda* (#:key inputs #:allow-other-keys)
279 (let ((clear (search-input-file inputs "bin/clear")))
280 (substitute* "bin/zabbix-cli"
282 (string-append "'" clear "'"))))))
283 (add-after 'unpack 'patch-setup.py
285 ;; Install data_files to $out/share instead of /usr/share.
286 (substitute* "setup.py"
288 (add-after 'build 'build-docs
290 (invoke "make" "-C" "docs" "manual")
291 (invoke "make" "-C" "docs" "singlehtml")))
292 (add-after 'install 'install-docs
294 (install-file "docs/_build/man/zabbix-cli.1"
295 (string-append #$output "/share/man/man1"))
296 (copy-recursively "docs/_build/singlehtml"
297 (string-append #$output "/share/doc/"
301 (invoke "pytest" "-vv"))))))
303 (list python-pytest python-sphinx))
305 (list ncurses python-requests))
306 (home-page "https://github.com/unioslo/zabbix-cli")
307 (synopsis "Command-line interface to Zabbix")
309 "@command{zabbix-cli} is a command-line client for the Zabbix
310 monitoring system. It can configure and display various aspects of Zabbix
311 through a text-based interface.")
312 (license license:gpl3+)))
314 (define-public python-pyzabbix
316 (name "python-pyzabbix")
318 (home-page "https://github.com/lukecyca/pyzabbix")
319 ;; No tests on PyPI, use the git checkout.
323 (uri (git-reference (url home-page) (commit version)))
324 (file-name (git-file-name name version))
327 "0ad5xac67brmwc3wd0f87pjplly3cqyrz1dp725lzz2hrjgiaqi8"))))
328 (build-system python-build-system)
330 '(#:phases (modify-phases %standard-phases
332 (lambda* (#:key tests? #:allow-other-keys)
334 (invoke "pytest" "-vv" "tests")
335 (format #t "test suite not run~%")))))))
338 (list python-requests-mock python-pytest))
340 (list python-packaging python-requests))
341 (synopsis "Python interface to the Zabbix API")
343 "@code{pyzabbix} is a Python module for working with the Zabbix API.")
344 (license license:lgpl2.1+)))
346 (define-public darkstat
352 (uri (string-append "https://unix4lyfe.org/darkstat/darkstat-"
356 "1mzddlim6dhd7jhr4smh0n2fa511nvyjhlx76b03vx7phnar1bxf"))))
357 (build-system gnu-build-system)
358 (arguments '(#:tests? #f)) ; no tests
361 (home-page "https://unix4lyfe.org/darkstat/")
362 (synopsis "Network statistics gatherer")
364 "@command{darkstat} is a packet sniffer that runs as a background process,
365 gathers all sorts of statistics about network usage, and serves them over
369 @item Traffic graphs, reports per host, shows ports for each host.
370 @item Embedded web-server with deflate compression.
371 @item Asynchronous reverse DNS resolution using a child process.
372 @item Small. Portable. Single-threaded. Efficient.
375 (license license:gpl2)))
377 (define-public python-whisper
379 (name "python-whisper")
384 (uri (pypi-uri "whisper" version))
387 "1bk29w09zcpsv8hp0g0al7nwrxa07z0ycls3mbh83wfavk83aprl"))))
388 (build-system python-build-system)
389 (native-inputs (list python-six))
390 (home-page "http://graphiteapp.org/")
391 (synopsis "Fixed size round-robin style database for Graphite")
392 (description "Whisper is one of three components within the Graphite
393 project. Whisper is a fixed-size database, similar in design and purpose to
394 RRD (round-robin-database). It provides fast, reliable storage of numeric
395 data over time. Whisper allows for higher resolution (seconds per point) of
396 recent data to degrade into lower resolutions for long-term retention of
398 (license license:asl2.0)))
400 (define-public python-carbon
402 (name "python-carbon")
407 (uri (pypi-uri "carbon" version))
410 "1wb91fipk1niciffq5xwqbh8g7rl7ghdam4m97cjbig12i5qr4cm"))))
411 (build-system python-build-system)
414 (modify-phases %standard-phases
415 ;; Don't install to /opt
416 (add-after 'unpack 'do-not-install-to-/opt
417 (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t)))))
419 (list python-cachetools python-txamqp python-urllib3 python-whisper))
420 (home-page "http://graphiteapp.org/")
421 (synopsis "Backend data caching and persistence daemon for Graphite")
422 (description "Carbon is a backend data caching and persistence daemon for
423 Graphite. Carbon is responsible for receiving metrics over the network,
424 caching them in memory for \"hot queries\" from the Graphite-Web application,
425 and persisting them to disk using the Whisper time-series library.")
426 (license license:asl2.0)))
428 (define-public graphite-web
430 (name "graphite-web")
435 (uri (pypi-uri "graphite-web" version))
438 "1l5a5rry9cakqxamvlx4xq63jifmncb6815bg9vy7fg1zyd3pjxk"))))
439 (build-system python-build-system)
441 `(#:tests? #f ;XXX: not in PyPI release & requires database
443 (modify-phases %standard-phases
444 (add-after 'unpack 'relax-requirements
446 (substitute* "setup.py"
447 ;; Allow newer versions of django-tagging.
448 (("django-tagging==")
451 ;; Don't install to /opt
452 (add-after 'unpack 'do-not-install-to-/opt
453 (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t)))))
455 (list python-cairocffi
459 python-django-tagging
464 (home-page "https://graphiteapp.org/")
465 (synopsis "Scalable realtime graphing system")
466 (description "Graphite is a scalable real-time graphing system that does
467 two things: store numeric time-series data, and render graphs of this data on
469 (license license:asl2.0)))
471 (define-public python-prometheus-client
473 (name "python-prometheus-client")
478 (uri (pypi-uri "prometheus_client" version))
480 (base32 "1ni2yv4ixwz32nz39ckia76lvggi7m19y5f702w5qczbnfi29kbi"))))
481 (build-system python-build-system)
483 '(;; No included tests.
486 (list python-twisted))
488 "https://github.com/prometheus/client_python")
489 (synopsis "Python client for the Prometheus monitoring system")
491 "The @code{prometheus_client} package supports exposing metrics from
492 software written in Python, so that they can be scraped by a Prometheus
495 Metrics can be exposed through a standalone web server, or through Twisted,
496 WSGI and the node exporter textfile collector.")
497 (license license:asl2.0)))
499 (define-public go-github-com-prometheus-node-exporter
501 (name "go-github-com-prometheus-node-exporter")
506 (url "https://github.com/prometheus/node_exporter")
507 (commit (string-append "v" version))))
508 (file-name (git-file-name name version))
511 "0s3sp1gj86p7npxl38hkgs6ymd3wjjmc5hydyg1b5wh0x3yvpx07"))))
512 (build-system go-build-system)
514 '(#:import-path "github.com/prometheus/node_exporter"))
515 (synopsis "Prometheus exporter for hardware and OS metrics")
516 (description "Prometheus exporter for metrics exposed by *NIX kernels,
517 written in Go with pluggable metric collectors.")
518 (home-page "https://github.com/prometheus/node_exporter")
519 (license license:asl2.0)))
521 (define-public temper-exporter
522 (let ((commit "a87bbab19c05609d62d9e4c7941178700c1ef84d")
525 (name "temper-exporter")
526 (version (git-version "0" revision commit))
530 (url "https://github.com/yrro/temper-exporter")
532 (file-name (git-file-name name version))
535 "0jk3ydi8s14q5kyl9j3gm2zrnwlb1jwjqpg5vqrgkbm9jrldrabc"))))
536 (build-system python-build-system)
538 '(#:tests? #f ; One test failure:
539 ; test/test_exporter.py:33:
542 (modify-phases %standard-phases
543 (add-after 'unpack 'patch-setup.py
545 (substitute* "setup.py"
546 (("git_ref = .*\n") "git_ref = ''\n"))
548 (add-after 'install 'install-udev-rules
549 (lambda* (#:key outputs #:allow-other-keys)
550 (install-file "debian/prometheus-temper-exporter.udev"
551 (string-append (assoc-ref outputs "out")
552 "/lib/udev/rules.d"))
555 (list python-prometheus-client python-pyudev))
557 (list python-pytest python-pytest-mock python-pytest-runner))
558 (home-page "https://github.com/yrro/temper-exporter")
559 (synopsis "Prometheus exporter for PCSensor TEMPer sensor devices")
561 "This package contains a Prometheus exporter for the TEMPer sensor
563 (license license:expat))))
565 (define-public fswatch
572 (url "https://github.com/emcrisostomo/fswatch")
574 (file-name (git-file-name name version))
577 "1zsvc8arza2ypnnmv4m0qfpnldmy1zh10q6wss05ibmanslfj2ql"))))
578 (build-system gnu-build-system)
580 (list autoconf automake gettext-minimal libtool))
582 (list #:configure-flags
583 #~(list "--disable-static")))
584 (synopsis "File system monitor")
585 (description "This package provides a file system monitor.")
586 (home-page "https://github.com/emcrisostomo/fswatch")
587 (license license:gpl3+)))
589 (define-public collectd
596 "https://storage.googleapis.com/collectd-tarballs/collectd-"
601 "1mh97afgq6qgmpvpr84zngh58m0sl1b4wimqgvvk376188q09bjv"))
602 (patches (search-patches "collectd-5.11.0-noinstallvar.patch"))))
603 (build-system gnu-build-system)
605 `(#:configure-flags (list "--localstatedir=/var" "--sysconfdir=/etc")
606 #:phases (modify-phases %standard-phases
607 (add-before 'configure 'autoreconf
609 ;; Required because of patched sources.
610 (invoke "autoreconf" "-vfi"))))))
612 (list rrdtool curl libyajl))
614 (list autoconf automake libtool pkg-config))
615 (home-page "https://collectd.org/")
616 (synopsis "Collect system and application performance metrics periodically")
618 "collectd gathers metrics from various sources such as the operating system,
619 applications, log files and external devices, and stores this information or
620 makes it available over the network. Those statistics can be used to monitor
621 systems, find performance bottlenecks (i.e., performance analysis) and predict
622 future system load (i.e., capacity planning).")
623 ;; license:expat for the daemon in src/daemon/ and some plugins,
624 ;; license:gpl2 for other plugins
625 (license (list license:expat license:gpl2))))
627 (define-public hostscope
634 "http://www.maier-komor.de/hostscope/hostscope-V"
638 "0jw6yij8va0f292g4xkf9lp9sxkzfgv67ajw49g3vq42q47ld7cv"))))
639 (build-system gnu-build-system)
640 (inputs (list ncurses))
641 (arguments '(#:tests? #f)) ;; No included tests.
642 (home-page "http://www.maier-komor.de/hostscope.html")
643 (properties `((release-monitoring-url . ,home-page)))
645 "System monitoring tool for multiple hosts")
647 "HostScope displays key system metrics of Linux hosts, such as detailed
648 CPU load, speed and temperature, I/O rates of network interfaces, I/O rates of
649 disks, and user process summary information. All metrics are multicast on the
650 LAN, if wanted, and clients can switch between multiple hosts on the network.
651 Hostscope features a bridge to Influx DB. So Grafana can be used to visualize
652 the recorded data over time.")
653 (license license:gpl3+)))
655 (define-public fatrace
662 (url "https://github.com/martinpitt/fatrace")
664 (file-name (git-file-name name version))
667 "1bxz6v1z0icp716jnv3knjyqp8bv6xnkz8gqd8z3g2b6yxj5xff3"))))
668 (build-system gnu-build-system)
671 (modify-phases %standard-phases
673 ;; tests need root to run as root,
674 ;; and there is no make target for them:
677 (list (string-append "CC=" ,(cc-for-target))
678 (string-append "PREFIX=" %output))))
679 (synopsis "File access events monitor")
680 (description "This package provides a utility to report system wide file
681 access events from all running processes. Its main purpose is to find
682 processes which keep waking up the disk unnecessarily and thus prevent some
684 (home-page "https://github.com/martinpitt/fatrace")
685 (license license:gpl3+)))
695 (url "https://www.kylheku.com/git/pw")
696 (commit (string-append "pw-" version))))
697 (file-name (git-file-name name version))
699 (base32 "1xn3qnzz48xan78cp83hfrcifrxx9lgnm14134qhyr5wvj7dk246"))))
700 (build-system gnu-build-system)
702 (list #:tests? #f ; There are no tests
704 #~(list (string-append "CC=" #$(cc-for-target))
705 (string-append "DESTDIR=" #$output))
707 #~(modify-phases %standard-phases
708 (add-after 'unpack 'fix-makefile
710 (substitute* "Makefile"
711 (("/share/man/man1 \\\\") "/share/man/man1; \\"))))
713 (add-before 'install 'make-install-dirs
715 (mkdir-p (string-append #$output "/bin"))
716 (mkdir-p (string-append #$output "/share/man/man1"))
717 (mkdir-p (string-append #$output "/share/man/man5")))))))
718 (home-page "https://www.kylheku.com/cgit/pw/")
719 (synopsis "Monitor recent lines of output from pipe")
721 "@command{pw} is Pipe Watch, a utility that continuously reads lines of
722 text from a pipe or pipe-like source, passes them through a FIFO buffer, and
723 maintains a display based on the occasional sampling of the contents of the
724 FIFO buffer, with useful features such as triggering and filtering.
726 With @command{pw} you can:
729 @item Interactively apply and remove filters on-the-fly, without interrupting
732 @item Make recurring patterns in the stream appear to ``freeze'' on the
733 screen, using triggers.
735 @item Prevent the overwhelming amount of output from a program from flooding
736 the terminal, while consuming all of that output so that the program isn't
737 blocked. @command{pw} can pause its display updates entirely.
739 @item Juggle multiple shell background jobs that produce output, yet execute
740 indefinitely without blocking. When @command{pw} runs as part of a shell
741 background job, it continues to consume input, process filters and take
742 snapshots, without displaying anything. When put into the foreground again,
745 (license license:bsd-2)))
747 (define-public python-statsd
749 (name "python-statsd")
753 (uri (pypi-uri "statsd" version))
756 "07yxnlalvcglgwa9pjs1clwrmwx7a4575jai7q05jz3g4i6dprp3"))))
757 (build-system python-build-system)
758 (native-inputs (list python-mock python-nose))
759 (home-page "https://github.com/jsocol/pystatsd")
760 (synopsis "Simple StatsD client")
761 (description "StatsD is a friendly front-end to Graphite. This package
762 provides a simple Python client for the StatsD daemon.")
763 (license license:expat)))
765 (define-public batsignal
772 (url "https://github.com/electrickite/batsignal")
774 (file-name (git-file-name name version))
777 "0b1j6mljnqgxwr3id3r9shzhsjk5r0qdh9cxkvy1dm4kzbyc4dxq"))))
778 (build-system gnu-build-system)
781 #~(list (string-append "PREFIX=" #$output)
782 (string-append "CC=" #$(cc-for-target)))
784 #~(modify-phases %standard-phases
785 (add-after 'unpack 'fix-cross-compile
787 (substitute* "Makefile"
789 #$(pkg-config-for-target)))))
792 (lambda* (#:key tests? #:allow-other-keys)
794 (invoke "./batsignal" "-v")))))))
795 (inputs (list libnotify))
796 (native-inputs (list pkg-config))
797 (home-page "https://github.com/electrickite/batsignal")
798 (synopsis "Power monitoring tool")
800 "This package provides a daemon that monitors device power levels,
801 notifying the user and optionally running a command when it reaches
802 user-configured power thresholds. This can be used to force powering off a
803 laptop when the battery gets below critical levels, instead of damaging the
805 (license license:isc)))