3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/netatop/default.nix

37 lines
1 KiB
Nix
Raw Normal View History

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