GNU bug report logs - #37717
[PATCH 0/3] gnu: Add kmonad.

Previous Next

Package: guix-patches;

Reported by: "Alex Griffin" <a <at> ajgrf.com>

Date: Sat, 12 Oct 2019 19:33:01 UTC

Severity: normal

Tags: patch

Done: "Alex Griffin" <a <at> ajgrf.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marius Bakke <mbakke <at> fastmail.com>
To: Alex Griffin <a <at> ajgrf.com>, 37717 <at> debbugs.gnu.org
Subject: [bug#37717] [PATCH 3/3] gnu: Add kmonad.
Date: Fri, 18 Oct 2019 20:37:31 +0200
[Message part 1 (text/plain, inline)]
"Alex Griffin" <a <at> ajgrf.com> writes:

> 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.

Nice work!

> From 93c0d7fd68c8bee08162dfb93725675dfd9d8101 Mon Sep 17 00:00:00 2001
> From: Alex Griffin <a <at> 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.

[...]

> +(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))))))

Nitpicking, but I have a preference for the more explicit
'call-with-output-file', as well as using 'format':

(call-with-output-file (string-append rules ...)
  (lambda (port)
    (format port "KERNEL...~%")))

YMMV.  This phase should return #t, though.

Otherwise LGTM.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 5 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.