nixos/uptime-kuma: Add additional lockdown settings to systemd unit (#361452)
[NixPkgs.git] / pkgs / by-name / ir / irqbalance / package.nix
blob48e2774aaa96b0fe9a0f6d8a76174e51f7a80de5
1 { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, ncurses, libcap_ng }:
3 stdenv.mkDerivation rec {
4   pname = "irqbalance";
5   version = "1.9.4";
7   src = fetchFromGitHub {
8     owner = "irqbalance";
9     repo = "irqbalance";
10     rev = "v${version}";
11     sha256 = "sha256-7es7wwsPnDSF37uL5SCgAQB+u+qGWmWDHOh3JkHuXMs=";
12   };
14   nativeBuildInputs = [ autoreconfHook pkg-config ];
15   buildInputs = [ glib ncurses libcap_ng ];
17   LDFLAGS = "-lncurses";
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     '';
29   meta = with lib; {
30     homepage = "https://github.com/Irqbalance/irqbalance";
31     changelog = "https://github.com/Irqbalance/irqbalance/releases/tag/v${version}";
32     description = "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; [ moni ];
36   };