diff mbox series

[bug#56960,v2] gnu: Add siglo.

Message ID PH0PR84MB1360B862D9CAC09584981AFD996A2@PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM
State New
Headers show
Series [bug#56960,v2] gnu: Add siglo. | expand

Commit Message

Wamm K. D. Jan. 9, 2024, 9:58 p.m. UTC
It seems I needed to unquote the gexp.


* gnu/packages/flashing-tools.scm (siglo): New variable.
---
 gnu/packages/flashing-tools.scm | 81 +++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 6165845261..b4f465014f 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -53,13 +53,21 @@  (define-module (gnu packages flashing-tools)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages embedded)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
+  #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages libftdi)
   #:use-module (gnu packages linux)
@@ -654,3 +662,76 @@  (define-public qdl
       (description "This tool communicates with USB devices of id 05c6:9008 to
 upload a flash loader and use this to flash images.")
       (license license:bsd-3))))
+
+(define-public siglo
+  (package
+    (name "siglo")
+    (version "0.9.9")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://github.com/alexr4535/" name "/"))
+                    (commit (string-append "v" version))))
+              (sha256 (base32
+                       "0c08xvr6w77dm5mgzlh6imqdi13bshnp9rxmskvp3j7fki3aqcp2"))))
+    (build-system meson-build-system)
+    (native-inputs (list gettext-minimal
+                         ;; for 'glib-compile-resources', 'glib-compile-schemas'
+                         `(,glib "bin")
+                         pkg-config
+                         ;; for gtk-update-icon-cache
+                         `(,gtk+ "bin")))
+    (inputs (list appstream-glib
+                  desktop-file-utils
+                  gtk+
+                  python
+                  python-pyxdg
+                  python-gatt
+                  python-dbus
+                  python-pygobject
+                  python-requests
+                  python-urllib3
+                  python-chardet
+                  python-certifi
+                  python-idna))
+    (arguments
+     (list #:glib-or-gtk? #t
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'remove-internet-using-test
+                 (lambda _
+                   (substitute* "data/meson.build"
+                     (("appstream_util.found\\(\\)") "false")
+                     (((string-append
+                        "install_data[(]'siglo\\.service', "
+                        "install_dir: '/etc/systemd/user/'[)]"))
+                      ""))))
+               (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+                 (lambda* (#:key outputs inputs #:allow-other-keys)
+                   (wrap-program (string-append #$output "/bin/siglo")
+                     `("GUIX_PYTHONPATH" = ,(search-path-as-list
+                                             `(,(string-append
+                                                 "/lib/python"
+                                                 #$(version-major+minor
+                                                    (package-version python))
+                                                 "/site-packages"))
+                                             (map cdr
+                                                  (filter
+                                                   (lambda (input)
+                                                     (string-prefix? "python"
+                                                                     (car input)))
+                                                   inputs))))
+                     `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
+    (synopsis "Synchronize InfiniTime watch with PinePhone")
+    (description "@code{siglo} is a graphical tool to update InfiniTime firmware
+to PineTime smartwatches running the InfiniTime operating system, via Bluetooth.
+
+@code{siglo} provides the following features:
+
+@itemize
+@item Retrieve the version of the InfiniTime firmware running.
+@item Check the battery charge.
+@item Synchronize the time.
+@end itemize")
+    (home-page "https://github.com/theironrobin/siglo")
+    (license license:mpl2.0)))