2014-01-05 01:57:21 +00:00
|
|
|
{ stdenv, fetchurl, kernel, zlib }:
|
2013-05-20 08:00:03 +00:00
|
|
|
|
2014-10-10 19:35:13 +00:00
|
|
|
assert stdenv.lib.versionOlder kernel.version "3.17";
|
|
|
|
|
2013-05-20 08:00:03 +00:00
|
|
|
stdenv.mkDerivation {
|
2014-01-05 01:57:21 +00:00
|
|
|
name = "netatop-${kernel.version}-0.3";
|
2013-05-20 08:00:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-08-08 08:26:49 +00:00
|
|
|
url = http://www.atoptool.nl/download/netatop-0.3.tar.gz;
|
|
|
|
sha256 = "0rk873nb1hgfnz040plmv6rm9mcm813n0clfjs53fsqbn8y1lhvv";
|
2013-05-20 08:00:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs mkversion
|
2014-01-05 01:57:21 +00:00
|
|
|
sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \
|
2013-05-20 08:00:03 +00:00
|
|
|
*/Makefile
|
2014-01-05 01:57:21 +00:00
|
|
|
sed -i -e 's,/lib/modules.*extra,'$out'/lib/modules/${kernel.modDirVersion}/extra,' \
|
2013-05-20 08:00:03 +00:00
|
|
|
-e s,/usr,$out, \
|
|
|
|
-e /init.d/d \
|
|
|
|
-e /depmod/d \
|
|
|
|
Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin $out/sbin $out/share/man/man{4,8}
|
|
|
|
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra
|
2013-05-20 08:00:03 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Network monitoring module for atop";
|
|
|
|
homepage = http://www.atoptool.nl/downloadnetatop.php;
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2013-05-20 08:00:03 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
};
|
|
|
|
}
|