mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 12:14:10 +00:00
8822778094
linuxPackages_hardkernel_4_14.netatop linuxPackages_hardkernel_latest.netatop remain broken. linuxPackages-libre.netatop linuxPackages.netatop linuxPackages_4_14.netatop linuxPackages_4_19.netatop linuxPackages_4_4.netatop linuxPackages_4_9.netatop linuxPackages_5_7.netatop linuxPackages_5_8.netatop linuxPackages_hardened.netatop linuxPackages_latest-libre.netatop linuxPackages_latest_hardened.netatop linuxPackages_latest_xen_dom0.netatop linuxPackages_latest_xen_dom0_hardened.netatop linuxPackages_testing_bcachefs.netatop linuxPackages_xen_dom0.netatop linuxPackages_xen_dom0_hardened.netatop linuxPackages_zen.netatop are good
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ stdenv, fetchurl, kernel, zlib }:
|
|
|
|
let
|
|
version = "3.1";
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
name = "netatop-${kernel.version}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.atoptool.nl/download/netatop-${version}.tar.gz";
|
|
sha256 = "0qjw8glfdmngfvbn1w63q128vxdz2jlabw13y140ga9i5ibl6vvk";
|
|
};
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
preConfigure = ''
|
|
patchShebangs mkversion
|
|
sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \
|
|
*/Makefile
|
|
sed -i -e 's,/lib/modules.*extra,'$out'/lib/modules/${kernel.modDirVersion}/extra,' \
|
|
-e s,/usr,$out, \
|
|
-e /init.d/d \
|
|
-e /depmod/d \
|
|
-e /netatop.service/d \
|
|
Makefile
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/bin $out/sbin $out/share/man/man{4,8}
|
|
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra
|
|
'';
|
|
|
|
meta = {
|
|
description = "Network monitoring module for atop";
|
|
homepage = "https://www.atoptool.nl/downloadnetatop.php";
|
|
license = stdenv.lib.licenses.gpl2;
|
|
platforms = stdenv.lib.platforms.linux;
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
};
|
|
}
|