lol
1{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, glib, ncurses, libcap_ng }:
2
3stdenv.mkDerivation rec {
4 pname = "irqbalance";
5 version = "1.9.0";
6
7 src = fetchFromGitHub {
8 owner = "irqbalance";
9 repo = "irqbalance";
10 rev = "v${version}";
11 sha256 = "sha256-OifGlOUT/zFz5gussEmLL24w4AovGeyNfbg/yCfzerw=";
12 };
13
14 nativeBuildInputs = [ autoreconfHook pkg-config ];
15 buildInputs = [ glib ncurses libcap_ng ];
16
17 LDFLAGS = "-lncurses";
18
19 postInstall =
20 ''
21 # Systemd service
22 mkdir -p $out/lib/systemd/system
23 grep -vi "EnvironmentFile" misc/irqbalance.service >$out/lib/systemd/system/irqbalance.service
24 substituteInPlace $out/lib/systemd/system/irqbalance.service \
25 --replace /usr/sbin/irqbalance $out/bin/irqbalance \
26 --replace ' $IRQBALANCE_ARGS' ""
27 '';
28
29 meta = with lib; {
30 homepage = "https://github.com/Irqbalance/irqbalance";
31 changelog = "https://github.com/Irqbalance/irqbalance/releases/tag/v${version}";
32 description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus";
33 license = licenses.gpl2Only;
34 platforms = platforms.linux;
35 maintainers = with maintainers; [ fortuneteller2k ];
36 };
37}