diff mbox

[bug#37717,0/3] gnu: Add kmonad.

Message ID 4ba7596b-5f84-f3ab-e15a-7a99011ad4c1@ajgrf.com
State Accepted
Headers show

Commit Message

Alex Griffin Oct. 26, 2019, 2:43 a.m. UTC
On 10/18/19 1:47 PM, Marius Bakke wrote:
> I sent some feedback on the individual patches.  Can you create an
> account on Savannah if you haven't already?  Then you can push the next
> version yourself.  :-)
> 
> Please also send a reply to this message signed by the same GPG key that
> you will use to sign commits, and make sure to upload it to Savannah.

Thanks! I've attached updated patches with the suggested changes,
created a Savannah account, and this email should be signed with my GPG key.

Kmonad 0.3 was released last week, but I don't think it can be updated
in Guix until we move to a newer Stackage.

> Should this not be provided by 'ghc-primitive'?  Perhaps it is
> expecting a different version?

From what I can gather, there were a few commits upstream to add support
for primitive 0.7 without breaking 0.6, but they forgot to make the same
change in the test suite.

https://github.com/jberryman/unagi-chan/commit/b4af3f2b0d76de701ec8ca4a17ab88f776fe80a9

Comments

Marius Bakke Oct. 28, 2019, 11:11 p.m. UTC | #1
Alex Griffin <a@ajgrf.com> writes:

> On 10/18/19 1:47 PM, Marius Bakke wrote:
>> I sent some feedback on the individual patches.  Can you create an
>> account on Savannah if you haven't already?  Then you can push the next
>> version yourself.  :-)
>> 
>> Please also send a reply to this message signed by the same GPG key that
>> you will use to sign commits, and make sure to upload it to Savannah.
>
> Thanks! I've attached updated patches with the suggested changes,
> created a Savannah account, and this email should be signed with my GPG key.

Great!  I have added you to the Savannah project now.  \o/

Make sure to read HACKING, and enjoy your new commit superpowers.  :-)

> Kmonad 0.3 was released last week, but I don't think it can be updated
> in Guix until we move to a newer Stackage.

Right.  Rumor has it that a new Stackage LTS 14 branch is coming up,
perhaps you can be an early tester?  ;-)

>> Should this not be provided by 'ghc-primitive'?  Perhaps it is
>> expecting a different version?
>
> From what I can gather, there were a few commits upstream to add support
> for primitive 0.7 without breaking 0.6, but they forgot to make the same
> change in the test suite.
>
> https://github.com/jberryman/unagi-chan/commit/b4af3f2b0d76de701ec8ca4a17ab88f776fe80a9

OK.  Can you adjust the comment to mention that a newer ghc-primitive is
required?  Otherwise LGTM.

Thanks, and welcome!
Alex Griffin Oct. 30, 2019, 3:56 a.m. UTC | #2
Just committed kmonad to master, marking this bug as done.

On Mon, Oct 28, 2019, at 11:11 PM, Marius Bakke wrote:
> Great!  I have added you to the Savannah project now.  \o/
> 
> Make sure to read HACKING, and enjoy your new commit superpowers.  :-)

> Thanks, and welcome! 

Thanks, I'm excited to be part of the project!

> Right.  Rumor has it that a new Stackage LTS 14 branch is coming up,
> perhaps you can be an early tester?  ;-)

Sure, I'll keep an eye out for it.
diff mbox

Patch

From 03602a5602a701554e82383b7032f2d6d02b8e19 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 | 59 +++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index c5e1cd6c64..a349c7445d 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.
 ;;;
@@ -496,6 +497,64 @@  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)
+               (call-with-output-file (string-append rules "/70-kmonad.rules")
+                 (lambda (port)
+                   (display
+                    (string-append
+                     "KERNEL==\"uinput\", MODE=\"0660\", "
+                     "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
+                    port)))
+               #t)))
+         (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