mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 18:03:04 +00:00
netatop: package netatop.service
This commit is contained in:
parent
5bf5cb1b1b
commit
2703a7999a
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, kernel, zlib }:
|
||||
{ lib, stdenv, fetchurl, kernel, kmod, zlib }:
|
||||
|
||||
let
|
||||
version = "3.1";
|
||||
@ -12,10 +12,11 @@ stdenv.mkDerivation {
|
||||
sha256 = "0qjw8glfdmngfvbn1w63q128vxdz2jlabw13y140ga9i5ibl6vvk";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
buildInputs = [ kmod zlib ];
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
patches = [ ./netatop.service.patch ];
|
||||
preConfigure = ''
|
||||
patchShebangs mkversion
|
||||
sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \
|
||||
@ -24,12 +25,14 @@ stdenv.mkDerivation {
|
||||
-e s,/usr,$out, \
|
||||
-e /init.d/d \
|
||||
-e /depmod/d \
|
||||
-e /netatop.service/d \
|
||||
-e s,/lib/systemd,$out/lib/systemd, \
|
||||
Makefile
|
||||
|
||||
kmod=${kmod} substituteAllInPlace netatop.service
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin $out/sbin $out/share/man/man{4,8}
|
||||
mkdir -p $out/lib/systemd/system $out/bin $out/sbin $out/share/man/man{4,8}
|
||||
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra
|
||||
'';
|
||||
|
||||
@ -38,6 +41,6 @@ stdenv.mkDerivation {
|
||||
homepage = "https://www.atoptool.nl/downloadnetatop.php";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
maintainers = with lib.maintainers; [ viric ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user