8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, ncurses, libcap_ng }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "irqbalance";
|
|
version = "1.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "irqbalance";
|
|
repo = "irqbalance";
|
|
rev = "v${version}";
|
|
sha256 = "01r9s63yxaijg8jqcbkwqlyqq2z673szb0vzd7qb2y3gk5jlif2y";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|