2014-01-05 02:57:21 +01:00
|
|
|
{ stdenv, fetchurl, kernel, zlib }:
|
2013-05-20 10:00:03 +02:00
|
|
|
|
2016-01-07 10:06:40 +01:00
|
|
|
let
|
2019-03-14 06:32:09 +01:00
|
|
|
version = "2.0";
|
2016-01-07 10:06:40 +01:00
|
|
|
in
|
2014-10-10 21:35:13 +02:00
|
|
|
|
2013-05-20 10:00:03 +02:00
|
|
|
stdenv.mkDerivation {
|
2016-01-07 10:06:40 +01:00
|
|
|
name = "netatop-${kernel.version}-${version}";
|
2013-05-20 10:00:03 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-01-07 10:06:40 +01:00
|
|
|
url = "http://www.atoptool.nl/download/netatop-${version}.tar.gz";
|
2019-03-14 06:32:09 +01:00
|
|
|
sha256 = "03n248p1l3ps7gj2hdlcbrb1fsw1zcmgzypj4j4l4rynjjh7qvf6";
|
2013-05-20 10:00:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "pic" ];
|
2016-02-12 03:46:35 +01:00
|
|
|
|
2013-05-20 10:00:03 +02:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs mkversion
|
2014-01-05 02:57:21 +01:00
|
|
|
sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \
|
2013-05-20 10:00:03 +02:00
|
|
|
*/Makefile
|
2014-01-05 02:57:21 +01:00
|
|
|
sed -i -e 's,/lib/modules.*extra,'$out'/lib/modules/${kernel.modDirVersion}/extra,' \
|
2013-05-20 10:00:03 +02:00
|
|
|
-e s,/usr,$out, \
|
|
|
|
-e /init.d/d \
|
|
|
|
-e /depmod/d \
|
|
|
|
Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/bin $out/sbin $out/share/man/man{4,8}
|
|
|
|
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra
|
2013-05-20 10:00:03 +02:00
|
|
|
'';
|
2016-01-07 10:06:40 +01:00
|
|
|
|
2013-05-20 10:00:03 +02:00
|
|
|
meta = {
|
|
|
|
description = "Network monitoring module for atop";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.atoptool.nl/downloadnetatop.php";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2013-05-20 10:00:03 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
};
|
|
|
|
}
|