Unverified Commit eab45971 authored by Sophie Tauchert's avatar Sophie Tauchert
Browse files

iio-sensor-proxy: 3.0 -> 3.5

parent 3c748757
Loading
Loading
Loading
Loading
+32 −25
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitLab, autoconf-archive, gettext, libtool, intltool, autoconf, automake
, glib, gtk3, gtk-doc, libgudev, pkg-config, systemd }:
{ lib
, stdenv
, fetchFromGitLab
, cmake
, libxml2
, meson
, ninja
, pkg-config
, libgudev
, systemd
, polkit
}:

stdenv.mkDerivation rec {
  pname = "iio-sensor-proxy";
  version = "3.0";
  version = "3.5";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    owner = "hadess";
    repo = pname;
    rev = version;
    sha256 = "0ngbz1vkbjci3ml6p47jh6c6caipvbkm8mxrc8ayr6vc2p9l1g49";
    hash = "sha256-pFu+nJzj45s7yIKoLWLeiv2AT5vLf6JpdWWQ0JZfnvY=";
  };

  configurePhase = ''
    runHook preConfigure

    ./autogen.sh --prefix=$out \
      --with-udevrulesdir=$out/lib/udev/rules.d \
      --with-systemdsystemunitdir=$out/lib/systemd/system

    runHook postConfigure
  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 = [
    glib
    gtk3
    gtk-doc
    libgudev
    systemd
    polkit
  ];

  nativeBuildInputs = [
    autoconf
    autoconf-archive
    automake
    gettext
    intltool
    libtool
    meson
    cmake
    libxml2
    ninja
    pkg-config
  ];

  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";
    homepage = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy";