nixpkgs/pkgs/os-specific/linux/iio-sensor-proxy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.3 KiB
Nix
Raw Normal View History

2023-07-27 18:22:42 +00:00
{ lib
, stdenv
, fetchFromGitLab
, glib
2023-07-27 18:22:42 +00:00
, cmake
, libxml2
, meson
, ninja
, pkg-config
, libgudev
, systemd
, polkit
}:
stdenv.mkDerivation rec {
pname = "iio-sensor-proxy";
2023-07-27 18:22:42 +00:00
version = "3.5";
2021-06-06 18:34:00 +00:00
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
2023-07-27 18:22:42 +00:00
owner = "hadess";
repo = pname;
rev = version;
hash = "sha256-pFu+nJzj45s7yIKoLWLeiv2AT5vLf6JpdWWQ0JZfnvY=";
};
2023-07-27 18:22:42 +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'"
'';
buildInputs = [
libgudev
systemd
2023-07-27 18:22:42 +00:00
polkit
];
nativeBuildInputs = [
2023-07-27 18:22:42 +00:00
meson
cmake
glib
2023-07-27 18:22:42 +00:00
libxml2
ninja
pkg-config
];
2023-07-27 18:22:42 +00:00
mesonFlags = [
(lib.mesonOption "udevrulesdir" "${placeholder "out"}/lib/udev/rules.d")
(lib.mesonOption "systemdsystemunitdir" "${placeholder "out"}/lib/systemd/system")
];
meta = with lib; {
description = "Proxy for sending IIO sensor data to D-Bus";
mainProgram = "monitor-sensor";
homepage = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy";
2023-07-27 18:22:42 +00:00
license = licenses.gpl3;
2023-07-29 13:57:24 +00:00
maintainers = with maintainers; [ _999eagle ];
platforms = platforms.linux;
};
}