From 8b79a00c445438a29522568b231db82f62e90e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 20 May 2013 10:00:03 +0200 Subject: [PATCH] Adding netatop module, for atop --- pkgs/os-specific/linux/netatop/default.nix | 36 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/os-specific/linux/netatop/default.nix diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix new file mode 100644 index 000000000000..4ca8235f3aea --- /dev/null +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, kernelDev, zlib }: + +stdenv.mkDerivation { + name = "netatop-${kernelDev.version}-0.2"; + + src = fetchurl { + url = http://www.atoptool.nl/download/netatop-0.2.tar.gz; + sha256 = "0ya4qys2qpw080sbgixyx1kawdx1c3smnxwmqcchn0hg9hhndvc0"; + }; + + buildInputs = [ zlib ]; + + preConfigure = '' + patchShebangs mkversion + sed -i -e 's,^KERNDIR.*,KERNDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build,' \ + */Makefile + sed -i -e 's,/lib/modules.*extra,'$out'/lib/modules/${kernelDev.modDirVersion}/extra,' \ + -e s,/usr,$out, \ + -e /init.d/d \ + -e /depmod/d \ + Makefile + ''; + + preInstall = '' + ensureDir $out/bin $out/share/man/man{4,8} + ensureDir $out/lib/modules/${kernelDev.modDirVersion}/extra + ''; + + 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]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 40ba110f2c48..47363ff43efe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6139,6 +6139,8 @@ let */ ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { }; + netatop = callPackage ../os-specific/linux/netatop { }; + perf = callPackage ../os-specific/linux/kernel/perf.nix { }; spl = callPackage ../os-specific/linux/spl/default.nix { };