2013-07-19 15:33:42 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, neon, libusb, openssl, udev, avahi, freeipmi
|
2013-12-20 14:15:44 +00:00
|
|
|
, libtool, makeWrapper }:
|
2011-06-14 03:41:01 +01:00
|
|
|
|
2012-12-12 15:17:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-04-24 05:04:07 +01:00
|
|
|
name = "nut-2.7.4";
|
2012-09-28 17:15:12 +01:00
|
|
|
|
2011-06-14 03:41:01 +01:00
|
|
|
src = fetchurl {
|
2013-12-20 14:15:44 +00:00
|
|
|
url = "http://www.networkupstools.org/source/2.7/${name}.tar.gz";
|
2017-04-24 05:04:07 +01:00
|
|
|
sha256 = "19r5dm07sfz495ckcgbfy0pasx0zy3faa0q7bih69lsjij8q43lq";
|
2011-06-14 03:41:01 +01:00
|
|
|
};
|
|
|
|
|
2013-07-19 15:33:42 +01:00
|
|
|
buildInputs = [ neon libusb openssl udev avahi freeipmi libtool ];
|
2011-06-14 03:41:01 +01:00
|
|
|
|
2013-12-20 14:15:44 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
2012-12-12 15:17:47 +00:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
[ "--with-all"
|
|
|
|
"--with-ssl"
|
|
|
|
"--without-snmp" # Until we have it ...
|
|
|
|
"--without-powerman" # Until we have it ...
|
|
|
|
"--without-cgi"
|
|
|
|
"--without-hal"
|
2014-03-13 20:44:51 +00:00
|
|
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
2013-12-20 14:15:44 +00:00
|
|
|
"--with-udev-dir=$(out)/etc/udev"
|
2012-12-12 15:17:47 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2011-06-14 03:41:01 +01:00
|
|
|
|
2017-04-24 05:04:07 +01:00
|
|
|
|
2013-12-20 14:15:44 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/nut-scanner --prefix LD_LIBRARY_PATH : \
|
2016-01-24 07:29:45 +00:00
|
|
|
"$out/lib:${neon}/lib:${libusb.out}/lib:${avahi}/lib:${freeipmi}/lib"
|
2013-12-20 14:15:44 +00:00
|
|
|
'';
|
|
|
|
|
2018-09-01 13:16:42 +01:00
|
|
|
meta = with stdenv.lib; {
|
2011-06-14 03:41:01 +01:00
|
|
|
description = "Network UPS Tools";
|
|
|
|
longDescription = ''
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = http://www.networkupstools.org/;
|
2013-12-20 14:15:44 +00:00
|
|
|
repositories.git = https://github.com/networkupstools/nut.git;
|
2018-09-01 13:16:42 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.pierron ];
|
|
|
|
license = with licenses; [ gpl1Plus gpl2Plus gpl3Plus ];
|
2012-12-12 15:17:47 +00:00
|
|
|
priority = 10;
|
2011-06-14 03:41:01 +01:00
|
|
|
};
|
|
|
|
}
|