nixpkgs-suyu/pkgs/applications/misc/nut/default.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

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