[PATCH] Add iio-sensor-proxy

  • Open
  • quality assurance status badge
Details
2 participants
  • Florian
  • (
Owner
unassigned
Submitted by
Florian
Severity
normal
F
F
Florian wrote on 10 Dec 2022 22:26
(address . guix-patches@gnu.org)
87k02zlzlm.fsf@posteo.net

F
F
florhizome wrote on 11 Dec 2022 17:16
[PATCH 1/2] gnu: Add libgudev-next
(address . 59948@debbugs.gnu.org)(name . florhizome)(address . florhizome@posteo.net)
25385f4134fe2e449cb85d140f6b6cf92060bdb0.1670775116.git.florhizome@posteo.net
From: florhizome <florhizome@posteo.net>

* gnu/packages/gnome.scm (libgudev-next): New variable.
* gnu/packages/freedesktop.scm (iio-sensor-proxy): New variable.
---
gnu/packages/gnome.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 047c077d7d..43d1f5acc7 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7070,6 +7070,19 @@ (define-public libgudev
part of udev-extras, then udev, then systemd. It's now a project on its own.")
(license license:lgpl2.1+)))
+(define-public libgudev-next
+ (package
+ (inherit libgudev)
+ (name "libgudev-next")
+ (version "237")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ version "/" name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd"))))))
+
(define-public gvfs
(package
(name "gvfs")
--
2.38.1
F
F
florhizome wrote on 11 Dec 2022 17:16
[PATCH 2/2] gnu: Add iio-sensor-proxy
(address . 59948@debbugs.gnu.org)(name . florhizome)(address . florhizome@posteo.net)
4c2106193551187473304b07f491b8295db14561.1670775116.git.florhizome@posteo.net
From: florhizome <florhizome@posteo.net>

---
gnu/packages/freedesktop.scm | 51 ++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 28d0c0722f..d3d66d5209 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -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")
--
2.38.1
(
Re: [bug#59948] [PATCH 1/2] gnu: Add libgudev-next
COZ4WRNYJJ58.31LWTXPF7MVPJ@guix-framework
Heya,

On Sun Dec 11, 2022 at 4:16 PM GMT, wrote:
Toggle quote (3 lines)
> * gnu/packages/gnome.scm (libgudev-next): New variable.
> * gnu/packages/freedesktop.scm (iio-sensor-proxy): New variable.

Remove the second line from the commit messaage ;)

Otherwise LGTM.

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOWB3wACgkQ7ImHg/nq
I21AHwwA7sYmmtMa5CSBNaqSlFsTL6bN6GJNgDAPpwBYi01Vpt/Bpqa64xUgAwWa
aNYsdoVBcLSKc6wYdUrN4ED8aNn6W9y2VvuI7IdCrzMzqNUzi3/iPeGdeFazcWy0
mTMe6meLBLEnDnxlfOrOdngiqn2yYozV79hKcDf4SjqPBAQ87l4SJRbE4deKZb/d
XZiDgBYb5LUSltepNZy9INE8LsmDhqyrOLsHrmsCDiK4cgVyHXWj+qE/Q2cpYM+c
zlGJGIn576wCrS8a6fAXr89XlHe+b5jJraMIF0+sgccsZS477tkxQV28dSdbsR5X
nalJfA8cyprK+MzckM0jh0kGFKXtKU8YGmvTpir30pe0EHLFdHvtw6YjIJxdrtus
eIJlwBOAC1diqy5jZ99fhvpz+tmSNazOr9kUEtcoOJsozqZhjK88vyHxWNPlLom8
5f6rxZmt31TLIczOE25eTHIRdy6++j2SSw8+LOxMhMegLp8lqYvcLjih2FblmIRB
hU1L42/n
=L51S
-----END PGP SIGNATURE-----


(
Re: [bug#59948] [PATCH 2/2] gnu: Add iio-sensor-proxy
COZ50KXKVHU9.1X4SW19999BCE@guix-framework
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:
Toggle quote (8 lines)
> --- 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.

Toggle quote (6 lines)
> + #: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?

Toggle quote (10 lines)
> + (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.

Toggle quote (3 lines)
> + (inputs
> + (list glib libgudev-next polkit))

INPUTS should typically come before NATIVE-INPUTS, imo.

Toggle quote (5 lines)
> + (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.

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOWCKYACgkQ7ImHg/nq
I20QQAv/dshGtQ9MxnXkkGOQTpZJFYgBzHRr+zPzVxTggTy9bmXbOHsDsho7hF7W
Akq8zOSg6KYoOl5WpQurFz8GhTUxxl5blimqmkZPllURHoQOwuG36LKs2sSWbuik
gve/6gQ0fOZlz1Shv04mVE1IoRswgj9Esjmc3Lg6r+P+/XOq0Et8rYrS0X4LABpW
OWxhIGyryheH7lIEk4bFKjo99txX1GP27sfnI2hIpaQjVOcRkMVIsNoddo0MuERX
oGvBvXNyeGcUoec1/WXmsbrrzZUkpkwQ/uG8H+WMBJSfchI2zzUo95ykzdJIxHZe
23sLCq606bs/pOMqaCfDfmwUfEtfye562Gjg8p65R/ElPMdU1q4gQvLGFwAPElxg
hhIKlsh1WRndS0e/6kKRmBYLmsktxbgnlKOJnLxFra/RBifsAwW4J+J5IA+BSh6O
Qq2bM/Wz/LlpKYUpFhSavGxZV0J8AAEEaP5qLKdTPPU0Y0vJmXMiMahenTRRDYW5
IV5gjKIG
=RbG0
-----END PGP SIGNATURE-----


?