From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:37570) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIlsB-0000QN-OK for guix-patches@gnu.org; Mon, 30 Mar 2020 00:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIlsA-0006Vi-Fo for guix-patches@gnu.org; Mon, 30 Mar 2020 00:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIlsA-0006Va-CF for guix-patches@gnu.org; Mon, 30 Mar 2020 00:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jIlsA-00018V-9k for guix-patches@gnu.org; Mon, 30 Mar 2020 00:18:02 -0400 Subject: [bug#40312] [PATCH 3/3] gnu: Add piper. Resent-Message-ID: From: Brendan Tildesley Date: Mon, 30 Mar 2020 15:16:51 +1100 Message-Id: <20200330041651.16348-3-mail@brendan.scot> In-Reply-To: <20200330041651.16348-1-mail@brendan.scot> References: <20200330041651.16348-1-mail@brendan.scot> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40312@debbugs.gnu.org * gnu/packages/gnome (piper): New variable. --- gnu/packages/gnome.scm | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index d44e9ea5e7..a98ffb2af5 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:) @@ -9958,3 +9959,65 @@ 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 url-fetch) + (uri + (string-append "https://github.com/libratbag/piper/archive/" + version ".tar.gz")) + (sha256 + (base32 + "0a7vbgj5g5pgkr8h8sd2pkhdnxrqy36i51jq2zxnql28jd8bfbfn")))) + (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.25.2