unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Alex Griffin" <a@ajgrf.com>
To: 37717@debbugs.gnu.org
Subject: [bug#37717] [PATCH 3/3] gnu: Add kmonad.
Date: Sat, 12 Oct 2019 22:32:58 +0000	[thread overview]
Message-ID: <0d12f8da-b2ca-4b42-a39d-64ed503416d5@www.fastmail.com> (raw)
In-Reply-To: <4551b258-a4e3-49f8-9c22-5840edbbd3a7@www.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

I went ahead and added the necessary udev rule to the kmonad package. The revised patch is attached. I've tested it and confirmed that if you add your user to the input group, and include kmonad in your system udev rules [1], you can run kmonad as an unprivileged user.

[1]: https://guix.gnu.org/manual/en/html_node/Base-Services.html

-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-gnu-Add-kmonad.patch --]
[-- Type: text/x-patch; name="0003-gnu-Add-kmonad.patch", Size: 3602 bytes --]

From 93c0d7fd68c8bee08162dfb93725675dfd9d8101 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 12 Oct 2019 13:55:49 -0500
Subject: [PATCH 3/3] gnu: Add kmonad.

* gnu/packages/haskell-apps.scm (kmonad): New variable.
---
 gnu/packages/haskell-apps.scm | 58 +++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index e09285d63a..69a4df2cc2 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015 John Soo <jsoo1@asu.edu>
+;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -497,6 +498,63 @@ with CSS and mouseover annotations, XHTML 1.0 with inline CSS styling, LaTeX,
 and mIRC chat codes.")
     (license license:bsd-3)))
 
+(define-public kmonad
+  (package
+    (name "kmonad")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/david-janssen/kmonad.git")
+             (commit "06d7b8c709efa695be35df9bde91275cbb2ba099")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1rjr4h5yq63x3kad6yn4p8v26389sd9dgr5n2w73s1chafapzwwd"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'haddock)             ; Haddock fails to generate docs
+         (add-after 'install 'install-udev-rules
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (rules (string-append out "/lib/udev/rules.d")))
+               (mkdir-p rules)
+               (with-output-to-file (string-append rules "/70-kmonad.rules")
+                 (lambda _
+                   (display
+                    (string-append
+                     "KERNEL==\"uinput\", MODE=\"0660\", "
+                     "GROUP=\"input\", OPTIONS+=\"static_node=uinput\""))
+                   (newline))))))
+         (add-after 'install-udev-rules 'install-documentation
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (string-append out "/share/doc/kmonad-" ,version)))
+               (install-file "README.md" doc)
+               (copy-recursively "doc" doc)
+               (copy-recursively "example" (string-append doc "/example"))
+               #t))))))
+    (inputs
+     `(("ghc-cereal" ,ghc-cereal)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-lens" ,ghc-lens)
+       ("ghc-megaparsec" ,ghc-megaparsec-7)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-unagi-chan" ,ghc-unagi-chan)
+       ("ghc-unliftio" ,ghc-unliftio)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)))
+    (home-page "https://github.com/david-janssen/kmonad")
+    (synopsis "Advanced keyboard manager")
+    (description "KMonad is a keyboard remapping utility that supports
+advanced functionality, such as custom keymap layers and modifiers, macros,
+and conditional mappings that send a different keycode when tapped or held.
+By operating at a lower level than most similar tools, it supports X11,
+Wayland, and Linux console environments alike.")
+    (license license:expat)))
+
 (define-public raincat
   (package
     (name "raincat")
-- 
2.23.0


  parent reply	other threads:[~2019-10-12 22:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12 19:32 [bug#37717] [PATCH 0/3] gnu: Add kmonad Alex Griffin
2019-10-12 19:33 ` [bug#37717] [PATCH 1/3] gnu: Add ghc-atomic-primops Alex Griffin
2019-10-18 18:23   ` Marius Bakke
2019-10-12 19:34 ` [bug#37717] [PATCH 2/3] gnu: Add ghc-unagi-chan Alex Griffin
2019-10-18 18:28   ` Marius Bakke
2019-10-12 19:38 ` [bug#37717] [PATCH 3/3] gnu: Add kmonad Alex Griffin
2019-10-12 22:32 ` Alex Griffin [this message]
2019-10-18 18:37   ` Marius Bakke
2019-10-18 18:47 ` [bug#37717] [PATCH 0/3] " Marius Bakke
2019-10-26  2:43   ` Alex Griffin
2019-10-28 23:11     ` Marius Bakke
2019-10-30  3:56       ` bug#37717: " Alex Griffin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d12f8da-b2ca-4b42-a39d-64ed503416d5@www.fastmail.com \
    --to=a@ajgrf.com \
    --cc=37717@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).