Subject: [bug#46066] [PATCH 2/2] gnu: Add interception-dual-function-keys.

From: Joseph LaFreniere <[email-masked]>
Date: Sat, 23 Jan 2021 21:20:50 -0600

--
Joseph LaFreniere
>From cce20f62028619ad565997a495c10507f874e95e Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <[email-masked]>
Date: Sat, 23 Jan 2021 16:13:27 -0600
Subject: [PATCH 2/2] gnu: Add interception-dual-function-keys.

* gnu/packages/linux.scm (interception-dual-function-keys): New variable.
---
 gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4112e9a00e..c22645408d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -3508,6 +3508,46 @@ devices that can inject events directly into the input subsystem.")
 @end itemize")
     (license (list license:gpl3 (license:non-copyleft "file://README.md")))))
 
+(define-public interception-dual-function-keys
+  (package
+    (name "interception-dual-function-keys")
+    (version "1.3.0")
+    (home-page "https://gitlab.com/interception/linux/plugins/dual-function-keys")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gvhkmwzl5fyyc7k8rc4rf2b9mzh05wa8wcybf9hz2x1mqkc7lmz"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libevdev" ,libevdev)
+       ("yaml-cpp" ,yaml-cpp)))
+    (arguments
+     `(#:make-flags (list "CC=gcc" "CXX=g++"
+                          (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-libevdev-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libevdev (assoc-ref inputs "libevdev")))
+               (substitute* "config.mk"
+                 (("/usr/include/libevdev-1.0")
+                  (string-append libevdev "/include/libevdev-1.0")))
+               #t)))
+         ;; No configure script
+         (delete 'configure)
+         ;; No target 'check'
+         (delete 'check))))
+    (synopsis "Tap for one key, hold for another")
+    (description
+     "Dual Function Keys is a plugin for @code{interception-tools} that allows
+one to send arbitrary keycodes when a given key is tapped or held.")
+    (license license:expat)))
+
 (define-public lvm2
   (package
     (name "lvm2")
-- 
2.30.0

Date: Sat, 23 Jan 2021 21:20:50 -0600
Message-ID: <[email-masked]>