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";
|
2021-06-29 16:31:29 +00:00
|
|
|
version = "1.8.0";
|
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}";
|
2021-06-29 16:31:29 +00:00
|
|
|
sha256 = "sha256-K+Nv6HqBZb0pwfNV127QDq+suaUD7TTV413S6j8NdUU=";
|
2016-01-03 17:05:18 +00:00
|
|
|
};
|
|
|
|
|
2021-11-09 22:27:52 +00:00
|
|
|
patches = [
|
|
|
|
# pull pending upstream inclusion fix for ncurses-6.3:
|
|
|
|
# https://github.com/Irqbalance/irqbalance/pull/194
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ncurses-6.3.patch";
|
|
|
|
url = "https://github.com/Irqbalance/irqbalance/commit/f8bdd0e64284d841544fd3ebe22f4652902ba8d2.patch";
|
|
|
|
sha256 = "sha256-QJIXr8BiKmn/81suuhNJsBRhY2as19/e480lsp2wd6g=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2021-06-29 16:31:29 +00:00
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ fortuneteller2k ];
|
2016-01-03 17:05:18 +00:00
|
|
|
};
|
|
|
|
}
|