2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, ncurses, libcap_ng }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "irqbalance";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irqbalance";
|
|
|
|
repo = "irqbalance";
|
|
|
|
rev = "v${version}";
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "1677ap6z4hvwga0vb8hrvpc0qggyarg9mlg11pxywz7mq94vdx19";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
buildInputs = [ glib ncurses libcap_ng ];
|
|
|
|
|
|
|
|
LDFLAGS = "-lncurses";
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Systemd service
|
|
|
|
mkdir -p $out/lib/systemd/system
|
|
|
|
grep -vi "EnvironmentFile" misc/irqbalance.service >$out/lib/systemd/system/irqbalance.service
|
|
|
|
substituteInPlace $out/lib/systemd/system/irqbalance.service \
|
|
|
|
--replace /usr/sbin/irqbalance $out/bin/irqbalance \
|
|
|
|
--replace ' $IRQBALANCE_ARGS' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/Irqbalance/irqbalance";
|
|
|
|
description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|