1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 meson,
6 ninja,
7 pkg-config,
8 unixtools,
9 dbus,
10 libcap,
11 polkit,
12 systemd,
13}:
14
15stdenv.mkDerivation {
16 pname = "rtkit";
17 version = "0.13";
18
19 src = fetchFromGitHub {
20 owner = "heftig";
21 repo = "rtkit";
22 rev = "c295fa849f52b487be6433e69e08b46251950399";
23 sha256 = "0yfsgi3pvg6dkizrww1jxpkvcbhzyw9110n1dypmzq0c5hlzjxcd";
24 };
25
26 patches = [
27 ./meson-actual-use-systemd_systemunitdir.patch
28 ./meson-fix-librt-find_library-check.patch
29 ./rtkit-daemon-dont-log-debug-messages-by-default.patch
30 ];
31
32 nativeBuildInputs = [
33 meson
34 ninja
35 pkg-config
36 unixtools.xxd
37 ];
38 buildInputs = [
39 dbus
40 libcap
41 polkit
42 systemd
43 ];
44
45 mesonFlags = [
46 "-Dinstalled_tests=false"
47
48 "-Ddbus_systemservicedir=${placeholder "out"}/share/dbus-1/system-services"
49 "-Ddbus_interfacedir=${placeholder "out"}/share/dbus-1/interfaces"
50 "-Ddbus_rulesdir=${placeholder "out"}/etc/dbus-1/system.d"
51 "-Dpolkit_actiondir=${placeholder "out"}/share/polkit-1/actions"
52 "-Dsystemd_systemunitdir=${placeholder "out"}/etc/systemd/system"
53 ];
54
55 meta = with lib; {
56 homepage = "https://github.com/heftig/rtkit";
57 description = "Daemon that hands out real-time priority to processes";
58 mainProgram = "rtkitctl";
59 license = with licenses; [
60 gpl3
61 bsd0
62 ]; # lib is bsd license
63 platforms = platforms.linux;
64 };
65}