From: "Nicolò Balzarotti" <anothersms@gmail.com>
To: 44258@debbugs.gnu.org
Subject: [bug#44258] Add Network UPS Tools
Date: Tue, 27 Oct 2020 17:12:26 +0100 [thread overview]
Message-ID: <87lffrmyvp.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (raw)
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
Hi guix!
This patch adds Network UPS Tools (nut).
I could test that binaries run, but could not connect to a real UPS (I
need to replace my UPSs as they are currently dead).
Let me know if any of you can try!
Thanks, Nicolò
[-- Attachment #2: 0001-gnu-Add-nut.patch --]
[-- Type: text/x-patch, Size: 4364 bytes --]
From 0e3a16eb19bc481d38edbe36c241ec4631cbdd33 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 27 Oct 2020 10:56:35 +0100
Subject: [PATCH] gnu: Add nut.
* gnu/packages/admin.scm (nut): New variable.
---
gnu/packages/admin.scm | 64 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 8dcf8afd84..02dccd8021 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -35,6 +35,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,6 +71,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages autogen)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages avahi)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
@@ -85,6 +87,7 @@
#:use-module (gnu packages elf)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages freeipmi)
#:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
@@ -110,6 +113,7 @@
#:use-module (gnu packages mcrypt)
#:use-module (gnu packages mpi)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages openldap)
#:use-module (gnu packages patchutils)
#:use-module (gnu packages pciutils)
@@ -880,6 +884,66 @@ IPv6, proxies, and Unix sockets.")
(license (list license:bsd-3
license:bsd-2)))) ; atomicio.*, socks.c
+(define-public nut
+ (package
+ (name "nut")
+ (version "2.7.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://networkupstools.org/source/2.7/nut-2.7.4.tar.gz")
+ (sha256
+ (base32
+ "19r5dm07sfz495ckcgbfy0pasx0zy3faa0q7bih69lsjij8q43lq"))
+ (patches
+ (list
+ ;; OpenSSL 1.1 support
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://patch-diff.githubusercontent.com/raw/"
+ "networkupstools/nut/pull/504.patch"))
+ (sha256
+ (base32 "1dabbzlmb886qy39xjx6nxlfrzfkm99n48la1ip32zm3baal6qph"))
+ (file-name (string-append name "-openssl1.1")))))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("--with-all"
+ "--with-openssl"
+ ;; powerman is required (where is it hosted?)
+ "--without-powerman"
+ ;; cgi requires libgd
+ "--without-cgi")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'update-configure
+ ;; required to apply the patch to the ./configure script
+ (lambda _
+ (invoke "autoconf"))))))
+ (native-inputs `(("autoconf" ,autoconf)
+ ("cppunit" ,cppunit)
+ ("pkg-config" ,pkg-config)))
+ (inputs `(("avahi" ,avahi)
+ ("libusb" ,libusb-compat)
+ ("libltdl" ,libltdl)
+ ("freeipmi" ,freeipmi)
+ ("neon" ,neon)
+ ("openssl" ,openssl)
+ ("net-snmp" ,net-snmp)))
+ (home-page "https://networkupstools.org")
+ (license
+ (list
+ ;; - most files under gpl2+
+ license:gpl2+
+ ;; - scripts/python/ under gpl3+
+ license:gpl3+
+ ;; - scripts/perl/Nut.pm same as perl (either gpl1+ or artistic)
+ license:gpl1+ license:artistic2.0))
+ (synopsis "Collection of programs for monitoring and administering UPS")
+ (description "Network UPS Tools is a collection of programs which provide
+a common interface for monitoring and administering UPS, PDU and SCD hardware.
+It uses a layered approach to connect all of the parts. Drivers are provided
+for a wide assortment of equipment.")))
+
(define-public sipcalc
(package
(name "sipcalc")
--
2.28.0
next reply other threads:[~2020-10-27 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 16:12 Nicolò Balzarotti [this message]
2020-11-10 19:55 ` [bug#44258] Add Network UPS Tools Marius Bakke
2020-11-14 16:45 ` Nicolò Balzarotti
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lffrmyvp.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me \
--to=anothersms@gmail.com \
--cc=44258@debbugs.gnu.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.