Subject: [PATCH] gnu: kmonad: Update to 0.4.2.

From: Dominic Martinez <[email-masked]>
Date: Fri, 28 Jun 2024 22:58:29 -0400

* gnu/packages/haskell-apps.scm (kmonad): Update to 0.4.2.

Change-Id: Ifbd162583e7838e8a986518434f5314ab3a32b56
---
 gnu/packages/haskell-apps.scm | 122 ++++++++++++++++------------------
 1 file changed, 59 insertions(+), 63 deletions(-)

diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index 3fce4f803c..63f1a3bfe8 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -614,73 +614,69 @@ (define-public hscolour
     (license license:bsd-3)))
 
 (define-public kmonad
-  ;; Project is active, but no new releases exist. Pick current master
-  ;; HEAD as of 2023-01-08.
-  (let ((commit "a0af5b8b3f085adb2c09ca52374a53566c25194c")
-        (revision "1"))
-    (package
-      (name "kmonad")
-      (version (git-version "0.4.1" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/david-janssen/kmonad")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32 "00qmmk1lgadhh32dqi530xm18v79ndcm7rrxvdsf827vicv2nhw1"))))
-      (build-system haskell-build-system)
-      (arguments
-       `(#:haddock? #f ; Haddock fails to generate docs
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'unpack 'patch-git-path
-             (lambda* (#:key inputs #:allow-other-keys)
-               (substitute* "src/KMonad/Args/TH.hs"
-                 (("\"git\"")
-                  (string-append "\"" (search-input-file inputs "/bin/git") "\"")))))
-           (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 "keymap" (string-append doc "/keymap"))
-                 #t))))))
-      (inputs
-       (list ghc-cereal
-             ghc-exceptions
-             ghc-lens
-             ghc-megaparsec
-             ghc-optparse-applicative
-             ghc-resourcet
-             ghc-rio
-             ghc-unliftio
-             ghc-unordered-containers
-             ghc-template-haskell))
-      (native-inputs (list ghc-hspec hspec-discover git))
-      (home-page "https://github.com/david-janssen/kmonad")
-      (synopsis "Advanced keyboard manager")
-      (description "KMonad is a keyboard remapping utility that supports
+  (package
+    (name "kmonad")
+    (version "0.4.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kmonad/kmonad")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0q8hdw3ab34kwydzpz5hcy8xj16fwb3r6gqj3cldzmi6fcbzfd1i"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:haddock? #f ; Haddock fails to generate docs
+                  #:phases
+                  (modify-phases %standard-phases
+                    (add-after 'unpack 'patch-git-path
+                      (lambda* (#:key inputs #:allow-other-keys)
+                        (substitute* "src/KMonad/Args/TH.hs"
+                          (("\"git\"")
+                           (string-append "\"" (search-input-file inputs "/bin/git") "\"")))))
+                    (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 "keymap" (string-append doc "/keymap"))
+                          #t))))))
+    (inputs
+     (list ghc-cereal
+           ghc-exceptions
+           ghc-lens
+           ghc-megaparsec
+           ghc-optparse-applicative
+           ghc-resourcet
+           ghc-rio
+           ghc-unliftio
+           ghc-unordered-containers
+           ghc-template-haskell))
+    (native-inputs (list ghc-hspec hspec-discover git))
+    (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))))
+    (license license:expat)))
 
 (define-public nixfmt
   (package

base-commit: 385fb14f6482a955fbef4d4b21fccb3473beddd8
-- 
2.45.2