diff mbox series

[bug#58501,v2,1/3] gnu: Add iio-sensor-proxy

Message ID 8dc869129712737addcc056b47384d3fd66c8977.1667508108.git.florhizome@posteo.net
State New
Headers show
Series [bug#58501,v2,1/3] gnu: Add iio-sensor-proxy | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue

Commit Message

florhizome Nov. 3, 2022, 8:59 p.m. UTC
From: florhizome <florhizome@posteo.net>

Second round, adjust to gexp argument style, enable all tests and minor improvements

* gnu/packages/freedesktop.scm (Add iio-sendor-proxy): New variable.
---
 gnu/packages/freedesktop.scm | 51 ++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)


base-commit: 754f260753fb6ebe28325616bc08336a184e4621
prerequisite-patch-id: 36ae907c0ae2cbc001f774c0514ab217855270c2
prerequisite-patch-id: 2c99b804c1a929fc9d74b4c3d92263cbd296f785
prerequisite-patch-id: 2525aea715c2eb5be5f61e2e14296a36898413ca
prerequisite-patch-id: f7afbf36e2776eced1e69090ec127a40456efca4
diff mbox series

Patch

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 07ccf9f8f2..8190f59c48 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.
 ;;;
@@ -728,6 +729,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.1")
+    (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
+         "1dpcc3i53aw5illfhfkwxy0hsjsnya5iw4iv4al46vgyvcnvjc8z"))))
+    (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 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")