2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, glib, ncurses, libcap_ng }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "irqbalance";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.9.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irqbalance";
|
|
|
|
repo = "irqbalance";
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-dk5gdDCXNELTlbZ34gUOVwPHvXF3N07v/ZqeNVfGTGw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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' ""
|
|
|
|
'';
|
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Irqbalance/irqbalance";
|
2021-07-03 03:11:41 +00:00
|
|
|
changelog = "https://github.com/Irqbalance/irqbalance/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus";
|
2021-07-03 03:11:41 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ fortuneteller2k ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|