diff mbox series

[bug#56594] gnu: linux: Add evtest.

Message ID 875yjx1r0m.fsf@gmail.com
State Accepted
Headers show
Series [bug#56594] gnu: linux: Add evtest. | expand

Checks

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

Commit Message

Artyom V. Poptsov July 16, 2022, 7 a.m. UTC
Hello,

this patch adds evtest. [1]
Thanks,

- Artyom

References:
1. https://gitlab.freedesktop.org/libevdev/evtest

Comments

Artyom V. Poptsov July 24, 2022, 7:01 a.m. UTC | #1
Gently ping.  :-)

- Artyom
Ludovic Courtès Aug. 3, 2022, 10:17 a.m. UTC | #2
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:

> From 5de46ed4acc56eb41e5ffe1bdacd0e05f86d49c9 Mon Sep 17 00:00:00 2001
> From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
> Date: Sat, 16 Jul 2022 09:51:26 +0300
> Subject: [PATCH] gnu: linux: Add evtest.
>
> * gnu/packages/linux.scm (evtest): New variable.

Applied with minor formatting changes (‘guix style’ isn’t doing a great
job here.)

Thanks,
Ludo’.
diff mbox series

Patch

From 5de46ed4acc56eb41e5ffe1bdacd0e05f86d49c9 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 16 Jul 2022 09:51:26 +0300
Subject: [PATCH] gnu: linux: Add evtest.

* gnu/packages/linux.scm (evtest): New variable.
---
 gnu/packages/linux.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 48beae0e69..0bf6f917c0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9280,3 +9280,62 @@  (define-public touchegg
 gestures you make on your touchpad or touchscreen into visible actions in your
 desktop.")
     (license license:gpl3+)))
+
+(define-public evtest
+  (package
+    (name "evtest")
+    (version "1.35")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.freedesktop.org/libevdev/evtest")
+                    (commit (string-append "evtest-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "164prnw35kda6jfykl7h52lfzy99ma2lk029zscyqk766k19spf4"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f ;No tests exist
+           #:make-flags #~(list (string-append "CC="
+                                               #$(cc-for-target))
+                                (string-append "PREFIX="
+                                               #$output))
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'generate-doc
+                          (lambda _
+                            (invoke "asciidoc"
+                                    "-d"
+                                    "manpage"
+                                    "-b"
+                                    "docbook"
+                                    "-o"
+                                    "evtest.1.xml"
+                                    "evtest.txt")
+                            (invoke "xsltproc" "--nonet"
+                                    (string-append #$(this-package-native-input
+                                                      "docbook-xsl")
+                                                   "/xml/xsl/docbook-xsl-"
+                                                   #$(package-version (this-package-native-input
+                                                                       "docbook-xsl"))
+                                                   "/manpages/docbook.xsl")
+                                    "evtest.1.xml")))
+                        (replace 'bootstrap
+                          (lambda _
+                            (setenv "CONFIG_SHELL"
+                                    (which "sh"))
+                            (invoke "autoreconf" "-fi"))))))
+    (native-inputs (list autoconf
+                         automake
+                         bash-minimal
+                         xmlto
+                         docbook-xsl
+                         libxslt
+                         asciidoc))
+    (home-page "https://gitlab.freedesktop.org/libevdev/evtest")
+    (synopsis "Kernel evdev device information and monitor")
+    (description
+     "@code{evtest} is a tool to print @code{evdev} kernel events.  It reads
+directly from the kernel device and prints a device description and the events
+with the value and the symbolic name.")
+    (license license:gpl2+)))
-- 
2.34.1