nixpkgs/pkgs/os-specific/linux/irqbalance/default.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, ncurses, libcap_ng }:
2016-01-03 17:05:18 +00:00
stdenv.mkDerivation rec {
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
};
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
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; {
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
};
}