2014-03-26 12:04:35 +01:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, file, openssl, perl, unzip }:
|
2012-06-10 01:28:07 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-12-30 20:55:07 +01:00
|
|
|
name = "net-snmp-5.7.3";
|
2012-06-10 01:28:07 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-03-26 12:04:35 +01:00
|
|
|
url = "mirror://sourceforge/net-snmp/${name}.zip";
|
2014-12-30 20:55:07 +01:00
|
|
|
sha256 = "0gkss3zclm23zwpqfhddca8278id7pk6qx1mydpimdrrcndwgpz8";
|
2012-06-10 01:28:07 +02:00
|
|
|
};
|
|
|
|
|
2012-06-10 19:06:35 +02:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
perlversion=$(perl -e 'use Config; print $Config{version};')
|
|
|
|
perlarchname=$(perl -e 'use Config; print $Config{archname};')
|
|
|
|
installFlags="INSTALLSITEARCH=$out/lib/perl5/site_perl/$perlversion/$perlarchname INSTALLSITEMAN3DIR=$out/share/man/man3"
|
2013-02-23 19:15:14 +01:00
|
|
|
|
|
|
|
# http://comments.gmane.org/gmane.network.net-snmp.user/32434
|
|
|
|
substituteInPlace "man/Makefile.in" --replace 'grep -vE' '@EGREP@ -v'
|
2012-06-10 19:06:35 +02:00
|
|
|
'';
|
|
|
|
|
2012-06-10 01:28:07 +02:00
|
|
|
configureFlags =
|
|
|
|
[ "--with-default-snmp-version=3"
|
|
|
|
"--with-sys-location=Unknown"
|
|
|
|
"--with-sys-contact=root@unknown"
|
|
|
|
"--with-logfile=/var/log/net-snmpd.log"
|
|
|
|
"--with-persistent-directory=/var/lib/net-snmp"
|
2016-04-16 19:44:32 +02:00
|
|
|
"--with-openssl=${openssl.dev}"
|
2015-12-17 12:35:15 +01:00
|
|
|
] ++ stdenv.lib.optional stdenv.isLinux "--with-mnttab=/proc/mounts";
|
2012-06-10 01:28:07 +02:00
|
|
|
|
2015-01-09 19:23:35 +01:00
|
|
|
buildInputs = [ autoreconfHook file perl unzip openssl ];
|
2012-06-10 01:28:07 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-12-07 16:32:30 +01:00
|
|
|
postInstall = ''
|
2016-09-10 13:05:59 +02:00
|
|
|
for f in "$out/lib/"*.la $out/bin/net-snmp-config $out/bin/net-snmp-create-v3-user; do
|
2016-08-23 03:10:20 +02:00
|
|
|
sed 's|-L${openssl.dev}|-L${openssl.out}|g' -i $f
|
2015-12-07 16:32:30 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2014-12-30 20:55:07 +01:00
|
|
|
meta = with stdenv.lib; {
|
2012-06-10 01:28:07 +02:00
|
|
|
description = "Clients and server for the SNMP network monitoring protocol";
|
|
|
|
homepage = http://net-snmp.sourceforge.net/;
|
2014-12-30 20:55:07 +01:00
|
|
|
license = licenses.bsd3;
|
2016-09-01 19:39:33 +02:00
|
|
|
platforms = platforms.linux;
|
2014-12-30 20:55:07 +01:00
|
|
|
maintainers = with maintainers; [ wkennington ];
|
2012-06-10 01:28:07 +02:00
|
|
|
};
|
|
|
|
}
|