diff mbox series

[bug#40312] ([PATCH 0/3]: Add Piper and libratbag -- New patch set; minor fixes.

Message ID b895b879-7ecc-be6f-8419-e7f6140c21d1@brendan.scot
State Accepted
Headers show
Series [bug#40312] ([PATCH 0/3]: Add Piper and libratbag -- New patch set; minor fixes. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Brendan Tildesley April 12, 2020, 5:27 a.m. UTC
This patch set (all attached) corrects my sloppy use of texinfo format 
in the python-evdev patch, and uses git-fetch instead of github archive 
tarballs.

I originally sent these patches in when the mailing list was down so it 
all got lost to civilization I think.

If you looking at reviewing this but have no interest in 
Piper/libratbag, at least it would be good to add python-evdev, as there 
is at least one other user that wishes to use it.

Thanks.

Comments

Nicolas Goaziou April 22, 2020, 11:02 p.m. UTC | #1
Hello,

Brendan Tildesley <mail@brendan.scot> writes:

> This patch set (all attached) corrects my sloppy use of texinfo format
> in the python-evdev patch, and uses git-fetch instead of github
> archive tarballs.
>
> I originally sent these patches in when the mailing list was down so
> it all got lost to civilization I think.
>
> If you looking at reviewing this but have no interest in
> Piper/libratbag, at least it would be good to add python-evdev, as
> there is at least one other user that wishes to use it.

All applied. Thank you.

Regards,
diff mbox series

Patch

From f4395487a19f003450793b1274af3def611a43f2 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Sat, 28 Mar 2020 19:14:45 +1100
Subject: [PATCH 3/3] gnu: Add piper.

* gnu/packages/gnome (piper): New variable.
---
 gnu/packages/gnome.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b1b4383f72..5d2144fceb 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -183,6 +183,7 @@ 
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build python-build-system)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -9956,3 +9957,63 @@  your operating-system definition:
 (simple-service 'ratbagd dbus-root-service-type (list libratbag))
 ")
     (license license:expat)))
+
+(define-public piper
+  (package
+    (name "piper")
+    (version "0.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/libratbag/piper.git")
+             (commit version)))
+       (sha256
+        (base32
+         "17h06j8lxpbfygq8fzycl7lml4vv7r05bsyhh3gga2hp0zms4mvg"))))
+    (build-system meson-build-system)
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("glib:bin" ,glib "bin")
+                     ("gobject-introspection" ,gobject-introspection)
+                     ("gettext" ,gettext-minimal)
+                     ("python-flake8" ,python-flake8)))
+    (inputs `(("gtk:bin" ,gtk+ "bin")
+              ("gtk" ,gtk+)
+              ("adwaita-icon-theme" ,adwaita-icon-theme)
+              ("librsvg" ,librsvg)
+              ("python-pygobject" ,python-pygobject)
+              ("python-lxml" ,python-lxml)
+              ("python-evdev" ,python-evdev)
+              ("python-pycairo" ,python-pycairo)))
+    (arguments
+     `(#:imported-modules ((guix build python-build-system)
+                           ,@%meson-build-system-modules)
+       #:modules (((guix build python-build-system) #:prefix python:)
+                  (guix build meson-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'dont-update-gtk-icon-cache
+           (lambda _
+             (substitute* "meson.build"
+               (("meson.add_install_script('meson_install.sh')") ""))
+             #t))
+         ;; TODO: Switch to wrap-script when it is fixed
+         (add-after 'install 'wrap-python
+           (assoc-ref python:%standard-phases 'wrap))
+         (add-after 'wrap-python 'wrap
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program
+                 (string-append (assoc-ref outputs "out" )"/bin/piper")
+               `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
+             #t)))))
+    (home-page "https://github.com/libratbag/piper/")
+    (synopsis "Configure bindings and LEDs on gaming mice")
+    (description "Piper is a GTK+ application for configuring gaming mice with
+onboard configuration for key bindings via libratbag. Piper requires a
+@command{ratbagd} daemon running with root privileges. It can be run manually
+as root, but is preferably configured as a dbus service that can launch on
+demand.  This can be configured by enabling the following service, provided
+there is a dbus-service present:
+ (simple-service 'ratbagd dbus-root-service-type (list libratbag))")
+    (license license:gpl2)))
-- 
2.26.0