Merge pull request #17303 from peterhoeg/iio

iio-sensor-proxy: init at 2.2 and nixos module

Changed files
+80
nixos
modules
hardware
sensor
pkgs
os-specific
linux
iio-sensor-proxy
top-level
+30
nixos/modules/hardware/sensor/iio.nix
···
+
{ config, lib, pkgs, ... }:
+
+
with lib;
+
+
{
+
###### interface
+
+
options = {
+
hardware.sensor.iio = {
+
enable = mkOption {
+
description = "Enable this option to support IIO sensors.";
+
type = types.bool;
+
default = false;
+
};
+
};
+
};
+
+
###### implementation
+
+
config = mkIf config.hardware.sensor.iio.enable {
+
+
boot.initrd.availableKernelModules = [ "hid-sensor-hub" ];
+
+
environment.systemPackages = with pkgs; [ iio-sensor-proxy ];
+
+
services.dbus.packages = with pkgs; [ iio-sensor-proxy ];
+
services.udev.packages = with pkgs; [ iio-sensor-proxy ];
+
systemd.packages = with pkgs; [ iio-sensor-proxy ];
+
};
+
}
+1
nixos/modules/module-list.nix
···
./hardware/ckb.nix
./hardware/cpu/amd-microcode.nix
./hardware/cpu/intel-microcode.nix
+
./hardware/sensor/iio.nix
./hardware/ksm.nix
./hardware/mcelog.nix
./hardware/network/b43.nix
+47
pkgs/os-specific/linux/iio-sensor-proxy/default.nix
···
+
{ stdenv, fetchFromGitHub, autoconf-archive, gettext, libtool, intltool, autoconf, automake
+
, glib, gtk3, gtk_doc, libgudev, pkgconfig, systemd }:
+
+
stdenv.mkDerivation rec {
+
name = "iio-sensor-proxy-${version}";
+
version = "2.2";
+
+
src = fetchFromGitHub {
+
owner = "hadess";
+
repo = "iio-sensor-proxy";
+
rev = version;
+
sha256 = "1x0whwm2r9g50hq5px0bgsrigy8naihqgi6qm0x5q87jz5lkhrnv";
+
};
+
+
configurePhase = ''
+
./autogen.sh --prefix=$out \
+
--with-udevrulesdir=$out/lib/udev/rules.d \
+
--with-systemdsystemunitdir=$out/lib/systemd/system
+
'';
+
+
buildInputs = [
+
glib
+
gtk3
+
gtk_doc
+
libgudev
+
systemd
+
];
+
+
nativeBuildInputs = [
+
autoconf
+
autoconf-archive
+
automake
+
gettext
+
intltool
+
libtool
+
pkgconfig
+
];
+
+
meta = with stdenv.lib; {
+
description = "Proxy for sending IIO sensor data to D-Bus";
+
homepage = https://github.com/hadess/iio-sensor-proxy;
+
license = licenses.gpl3 ;
+
maintainers = with maintainers; [ peterhoeg ];
+
platforms = platforms.linux;
+
inherit version;
+
};
+
}
+2
pkgs/top-level/all-packages.nix
···
long-shebang = callPackage ../misc/long-shebang {};
+
iio-sensor-proxy = callPackage ../os-specific/linux/iio-sensor-proxy { };
+
mathics = pythonPackages.mathics;
meson = callPackage ../development/tools/build-managers/meson { };