2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, ncurses, libcap_ng }:
|
2016-01-03 17:05:18 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "irqbalance";
|
2020-08-11 04:57:07 +01:00
|
|
|
version = "1.7.0";
|
2016-01-03 17:05:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irqbalance";
|
|
|
|
repo = "irqbalance";
|
2017-08-01 00:50:48 +01:00
|
|
|
rev = "v${version}";
|
2020-08-11 04:57:07 +01:00
|
|
|
sha256 = "1677ap6z4hvwga0vb8hrvpc0qggyarg9mlg11pxywz7mq94vdx19";
|
2016-01-03 17:05:18 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2017-08-01 00:50:48 +01:00
|
|
|
buildInputs = [ glib ncurses libcap_ng ];
|
2016-01-03 17:05:18 +00:00
|
|
|
|
2017-08-01 00:50:48 +01:00
|
|
|
LDFLAGS = "-lncurses";
|
2016-01-03 17:05:18 +00:00
|
|
|
|
2020-02-02 17:09:45 +00:00
|
|
|
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' ""
|
|
|
|
'';
|
|
|
|
|
2016-01-03 17:05:18 +00:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Irqbalance/irqbalance";
|
2016-01-03 17:05:18 +00:00
|
|
|
description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus";
|
2021-01-15 14:45:37 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.linux;
|
2016-01-03 17:05:18 +00:00
|
|
|
};
|
|
|
|
}
|