2016-10-05 08:48:57 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, dbus, libcap }:
|
2011-07-26 14:12:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-11 20:21:39 +00:00
|
|
|
pname = "rtkit";
|
|
|
|
version = "0.11";
|
2016-10-05 08:48:57 +00:00
|
|
|
|
2011-07-26 14:12:33 +00:00
|
|
|
src = fetchurl {
|
2014-04-18 10:21:20 +00:00
|
|
|
url = "http://0pointer.de/public/${name}.tar.xz";
|
|
|
|
sha256 = "1l5cb1gp6wgpc9vq6sx021qs6zb0nxg3cn1ba00hjhgnrw4931b8";
|
2011-07-26 14:12:33 +00:00
|
|
|
};
|
|
|
|
|
2014-04-18 10:21:20 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
|
|
|
];
|
|
|
|
|
2016-10-05 08:48:57 +00:00
|
|
|
patches = [
|
2016-10-05 16:07:12 +00:00
|
|
|
# Drop removed ControlGroup stanza
|
2016-10-05 08:48:57 +00:00
|
|
|
(fetchpatch {
|
2016-10-05 16:07:12 +00:00
|
|
|
url = "http://git.0pointer.net/rtkit.git/patch/?id=6c28e20c0be2f616a025059fda0ffac84e7f4f17";
|
2016-10-05 08:48:57 +00:00
|
|
|
sha256 = "0lsxk5nv08i1wjb4xh20i5fcwg3x0qq0k4f8bc0r9cczph2sv7ck";
|
|
|
|
})
|
2016-10-05 16:07:12 +00:00
|
|
|
|
|
|
|
# security patch: Pass uid of caller to polkit
|
|
|
|
(fetchpatch {
|
|
|
|
url = "http://git.0pointer.net/rtkit.git/patch/?id=88d4082ef6caf6b071d749dca1c50e7edde914cc";
|
|
|
|
sha256 = "0hp1blbi359qz8fmr6nj4w9yc0jf3dd176f8pn25wdj38n13qkix";
|
|
|
|
})
|
2018-04-12 14:02:52 +00:00
|
|
|
|
|
|
|
# Fix format string errors due to -Werror=format-security
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/r/rtkit/0.11-6/debian/patches/0006-fix-format-strings.patch";
|
|
|
|
sha256 = "09mr89lh16jvz6cqw00zmh0xk919bjfhjkvna1czwmafwy9p7kgp";
|
|
|
|
})
|
2016-10-05 08:48:57 +00:00
|
|
|
];
|
|
|
|
|
2017-09-05 21:26:13 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ dbus libcap ];
|
2019-11-04 12:33:53 +00:00
|
|
|
NIX_LDFLAGS = "-lrt";
|
2014-04-18 10:21:20 +00:00
|
|
|
|
2018-08-30 19:54:56 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://0pointer.de/blog/projects/rtkit";
|
2017-04-29 08:45:20 +00:00
|
|
|
description = "A daemon that hands out real-time priority to processes";
|
2018-08-30 19:54:56 +00:00
|
|
|
license = with licenses; [ gpl3 bsd0 ]; # lib is bsd license
|
|
|
|
platforms = platforms.linux;
|
2011-07-26 14:12:33 +00:00
|
|
|
};
|
|
|
|
}
|