2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
2023-08-22 20:05:09 +00:00
|
|
|
, glib
|
2023-08-04 22:07:22 +00:00
|
|
|
, cmake
|
|
|
|
, libxml2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, libgudev
|
|
|
|
, systemd
|
|
|
|
, polkit
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "iio-sensor-proxy";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
2023-08-04 22:07:22 +00:00
|
|
|
owner = "hadess";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-pFu+nJzj45s7yIKoLWLeiv2AT5vLf6JpdWWQ0JZfnvY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
# upstream meson.build currently doesn't have an option to change the default polkit dir
|
|
|
|
substituteInPlace data/meson.build \
|
|
|
|
--replace 'polkit_policy_directory' "'$out/share/polkit-1/actions'"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libgudev
|
|
|
|
systemd
|
2023-08-04 22:07:22 +00:00
|
|
|
polkit
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-08-04 22:07:22 +00:00
|
|
|
meson
|
|
|
|
cmake
|
2023-08-22 20:05:09 +00:00
|
|
|
glib
|
2023-08-04 22:07:22 +00:00
|
|
|
libxml2
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonOption "udevrulesdir" "${placeholder "out"}/lib/udev/rules.d")
|
|
|
|
(lib.mesonOption "systemdsystemunitdir" "${placeholder "out"}/lib/systemd/system")
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Proxy for sending IIO sensor data to D-Bus";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "monitor-sensor";
|
2022-10-06 18:32:54 +00:00
|
|
|
homepage = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy";
|
2023-08-04 22:07:22 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ _999eagle ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|