2021-11-09 22:27:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, glib, ncurses, libcap_ng }:
|
2016-01-03 17:05:18 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "irqbalance";
|
2022-10-31 18:57:47 +00:00
|
|
|
version = "1.9.2";
|
2016-01-03 17:05:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irqbalance";
|
|
|
|
repo = "irqbalance";
|
2017-07-31 23:50:48 +00:00
|
|
|
rev = "v${version}";
|
2022-10-31 18:57:47 +00:00
|
|
|
sha256 = "sha256-dk5gdDCXNELTlbZ34gUOVwPHvXF3N07v/ZqeNVfGTGw=";
|
2016-01-03 17:05:18 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2017-07-31 23:50:48 +00:00
|
|
|
buildInputs = [ glib ncurses libcap_ng ];
|
2016-01-03 17:05:18 +00:00
|
|
|
|
2017-07-31 23:50:48 +00: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' ""
|
|
|
|
'';
|
|
|
|
|
2021-06-29 16:31:29 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/Irqbalance/irqbalance";
|
2021-06-29 16:31:29 +00:00
|
|
|
changelog = "https://github.com/Irqbalance/irqbalance/releases/tag/v${version}";
|
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-06-29 16:31:29 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
2023-11-17 10:03:27 +00:00
|
|
|
maintainers = with maintainers; [ moni ];
|
2016-01-03 17:05:18 +00:00
|
|
|
};
|
|
|
|
}
|