lol
1{ stdenv, fetchurl, pkgconfig, neon, libusb, openssl, udev, avahi, freeipmi
2, libtool, makeWrapper }:
3
4stdenv.mkDerivation rec {
5 name = "nut-2.7.4";
6
7 src = fetchurl {
8 url = "http://www.networkupstools.org/source/2.7/${name}.tar.gz";
9 sha256 = "19r5dm07sfz495ckcgbfy0pasx0zy3faa0q7bih69lsjij8q43lq";
10 };
11
12 buildInputs = [ neon libusb openssl udev avahi freeipmi libtool ];
13
14 nativeBuildInputs = [ pkgconfig makeWrapper ];
15
16 configureFlags =
17 [ "--with-all"
18 "--with-ssl"
19 "--without-snmp" # Until we have it ...
20 "--without-powerman" # Until we have it ...
21 "--without-cgi"
22 "--without-hal"
23 "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
24 "--with-udev-dir=$(out)/etc/udev"
25 ];
26
27 enableParallelBuilding = true;
28
29
30 postInstall = ''
31 wrapProgram $out/bin/nut-scanner --prefix LD_LIBRARY_PATH : \
32 "$out/lib:${neon}/lib:${libusb.out}/lib:${avahi}/lib:${freeipmi}/lib"
33 '';
34
35 meta = {
36 description = "Network UPS Tools";
37 longDescription = ''
38 Network UPS Tools is a collection of programs which provide a common
39 interface for monitoring and administering UPS, PDU and SCD hardware.
40 It uses a layered approach to connect all of the parts.
41 '';
42 homepage = http://www.networkupstools.org/;
43 repositories.git = https://github.com/networkupstools/nut.git;
44 platforms = with stdenv.lib.platforms; linux;
45 maintainers = with stdenv.lib.maintainers; [ pierron ];
46 priority = 10;
47 };
48}