[bug#59948,2/2] gnu: Add iio-sensor-proxy
Commit Message
From: florhizome <florhizome@posteo.net>
---
gnu/packages/freedesktop.scm | 51 ++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Comments
The (currently empty) commit message should have the removed line from the
previous patch.
On Sun Dec 11, 2022 at 4:16 PM GMT, wrote:
> --- a/gnu/packages/freedesktop.scm
> +++ b/gnu/packages/freedesktop.scm
> @@ -810,6 +811,56 @@ (define-public elogind
> +(define-public iio-sensor-proxy
> + (package
> + (name "iio-sensor-proxy")
^^^
Too much indentation ;) Two spaces are enough.
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-before 'configure 'fake-pkexec
> + (lambda _
> + (setenv "PKEXEC_UID" "-1")))
Could you add a comment explaining why this is necessary?
> + (native-inputs
> + (list dbus
> + (list glib "bin")
> + gobject-introspection
> + python
> + python-dbusmock
> + python-psutil
> + pkg-config
> + umockdev))
Please sort these alphabetically by putting PKG-CONFIG before PYTHON.
> + (inputs
> + (list glib libgudev-next polkit))
INPUTS should typically come before NATIVE-INPUTS, imo.
> + (description "With a GNOME 3.18 (or newer) based system, orientation changes
> + will automatically be applied when rotating the panel, ambient light will be
> + used to change the screen brightness, and GeoClue will be able to read the compass
> +data to show the direction in Maps.")
This isn't a full sentence. Please write a description explaining exactly
what it does.
-- (
@@ -31,6 +31,7 @@
;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2022 florhizome <florhizome@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -810,6 +811,56 @@ (define-public elogind
of a the system to know what users are logged in, and where.")
(license license:lgpl2.1+)))
+(define-public iio-sensor-proxy
+ (package
+ (name "iio-sensor-proxy")
+ (version "3.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zf9kjhngs8k8vpwfiyra60vp4zic6gzs7axw1cd736my9pyhniv"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-Dsystemdsystemunitdir=false"
+ (string-append "-Dudevrulesdir="
+ #$output "/lib/udev"))
+ #:glib-or-gtk? #t
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fake-pkexec
+ (lambda _
+ (setenv "PKEXEC_UID" "-1")))
+ (add-before 'configure 'correct-polkit-dir
+ (lambda _
+ (substitute* "meson.build"
+ (("polkit_gobject_dep\\..*")
+ (string-append "'" #$output "/share/polkit-1/actions'"))))))))
+ (native-inputs
+ (list dbus
+ (list glib "bin")
+ gobject-introspection
+ python
+ python-dbusmock
+ python-psutil
+ pkg-config
+ umockdev))
+ (inputs
+ (list glib libgudev-next polkit))
+ (home-page "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy")
+ (synopsis "Proxies sensor devices to applications through D-Bus")
+ (description "With a GNOME 3.18 (or newer) based system, orientation changes
+ will automatically be applied when rotating the panel, ambient light will be
+ used to change the screen brightness, and GeoClue will be able to read the compass
+data to show the direction in Maps.")
+ (license license:gpl3)))
+
(define-public basu
(package
(name "basu")