1 { lib, stdenv, python3, fetchFromGitHub, makeWrapper, schedtool, sysctl, util-linux, fetchpatch }:
3 stdenv.mkDerivation rec {
5 version = "unstable-2023-03-21";
7 src = fetchFromGitHub {
10 rev = "1e2cc9a62ba3b6793e59da66aa0039f89e1ad49f";
11 sha256 = "sha256-nHp47eYI36edka+cBMzayPHEflAzpgLx0VehhsyYpwI=";
15 # https://github.com/Nefelim4ag/Ananicy/pull/437
16 # fix makefile destinations
18 url = "https://github.com/Nefelim4ag/Ananicy/commit/dbda0f50670de3f249991706ef1cc107c5197a2f.patch";
19 sha256 = "sha256-vMcJxekg2QUbm253CLAv3tmo5kedSlw+/PI/LamNWwc=";
20 # only used for debian packaging. lets exclude it so the patch applies even when that file is changed
21 excludes = [ "package.sh" ];
25 nativeBuildInputs = [ makeWrapper ];
26 buildInputs = [ python3 ];
30 "SYSCONFDIR=${placeholder "out"}/etc"
37 wrapProgram $out/bin/ananicy \
38 --prefix PATH : ${lib.makeBinPath [ schedtool util-linux ]}
40 substituteInPlace $out/lib/systemd/system/ananicy.service \
41 --replace "/sbin/sysctl" "${sysctl}/bin/sysctl" \
42 --replace "/usr/bin/ananicy" "$out/bin/ananicy"
46 homepage = "https://github.com/Nefelim4ag/Ananicy";
47 description = "Another auto nice daemon, with community rules support";
48 license = licenses.gpl3Only;
49 platforms = platforms.linux;
50 maintainers = with maintainers; [ artturin ];