[PATCH 0/8] gnu: Add qmk.

  • Done
  • quality assurance status badge
Details
2 participants
  • Jean-Pierre De Jesus DIAZ
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Jean-Pierre De Jesus DIAZ
Severity
normal
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:54
(address . guix-patches@gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125446.8208-1-jean@foundationdevices.com
Hello,

This patch series add support for the QMK command line utility which is used
to manage the firmware of keyboards supporting QMK firmwares.

CC'ed embedded and python teams.

Jean-Pierre De Jesus DIAZ (8):
gnu: Add python-hid.
gnu: Add python-spinners.
gnu: Add python-log-symbols.
gnu: Add python-halo.
gnu: Add python-hjson.
gnu: Add python-dotty-dict.
gnu: Add python-milc.
gnu: Add qmk.

gnu/packages/firmware.scm | 26 +++++++++++++
gnu/packages/hardware.scm | 1 +
gnu/packages/libusb.scm | 37 ++++++++++++++++++
gnu/packages/python-xyz.scm | 64 ++++++++++++++++++++++++++++++
gnu/packages/terminals.scm | 77 +++++++++++++++++++++++++++++++++++++
5 files changed, 205 insertions(+)


base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 1/8] gnu: Add python-hid.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-1-jean@foundationdevices.com
* gnu/packages/libusb.scm (python-hid): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 13090d30ab..c80e7061ad 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -653,6 +654,42 @@ (define-public hidapi
license:bsd-3
(license:non-copyleft "file://LICENSE-orig.txt")))))
+(define-public python-hid
+ (package
+ (name "python-hid")
+ (version "1.0.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "hid" version))
+ (sha256
+ (base32
+ "1s5hvfbmnlmifswr5514f4xxn5rcd429bdcdqzgwkdxrg9zlx58y"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; No tests present on the source tree, without this compilation fails
+ ;; because it "requires" the python-nose package, but it is not really
+ ;; necessary.
+ (list #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-extra-library-paths
+ (lambda _
+ (let ((libhidapi-hidraw.so
+ #$(file-append hidapi "/lib/libhidapi-hidraw.so"))
+ (libhidapi-libusb.so
+ #$(file-append hidapi "/lib/libhidapi-libusb.so")))
+ (substitute* "hid/__init__.py"
+ (("library_paths = \\(.*$" all)
+ (string-append
+ all
+ " '" libhidapi-hidraw.so "',\n"
+ " '" libhidapi-libusb.so "',\n")))))))))
+ (inputs (list hidapi))
+ (home-page "https://github.com/apmorton/pyhidapi")
+ (synopsis "Python @code{ctypes} bindings for HIDAPI library")
+ (description "Python @code{ctypes} bindings for HIDAPI library.")
+ (license license:expat)))
+
(define-public python-hidapi
(package
(name "python-hidapi")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 2/8] gnu: Add python-spinners.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-2-jean@foundationdevices.com
* gnu/packages/terminals.scm (python-spinners): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 9b705c874f..8f7e3c0e9a 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 Felipe Balbi <balbi@kernel.org>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,6 +99,7 @@ (define-module (gnu packages terminals)
#:use-module (gnu packages popt)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
@@ -1176,6 +1178,32 @@ (define-public python-curtsies
per-line fullscreen terminal rendering, and keyboard input event reporting.")
(license license:expat)))
+(define-public python-spinners
+ (package
+ (name "python-spinners")
+ (version "0.0.24")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "spinners" version))
+ (sha256
+ (base32
+ "0zz2z6dpdjdq5z8m8w8dfi8by0ih1zrdq0caxm1anwhxg2saxdhy"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "requirements-dev.txt"
+ (("(.*)==(.*)$" _ dep ver)
+ (string-append dep ">=" ver))))))))
+ (native-inputs (list python-coverage python-nose python-pylint python-tox))
+ (home-page "https://github.com/manrajgrover/py-spinners")
+ (synopsis "Python library with graphical spinners for the terminal")
+ (description "Spinners is a Python library that contains graphical spinners
+that can be displayed terminal.")
+ (license license:expat)))
+
(define-public tmate
(package
(name "tmate")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 3/8] gnu: Add python-log-symbols.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-3-jean@foundationdevices.com
* gnu/packages/terminals.scm (python-log-symbols): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 8f7e3c0e9a..bfb333aba9 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -1178,6 +1178,34 @@ (define-public python-curtsies
per-line fullscreen terminal rendering, and keyboard input event reporting.")
(license license:expat)))
+(define-public python-log-symbols
+ (package
+ (name "python-log-symbols")
+ (version "0.0.14")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "log_symbols" version))
+ (sha256
+ (base32
+ "0mh5d0igw33libfmbsr1ri1p1y644p36nwaa2w6kzrd8w5pvq2yg"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "requirements-dev.txt"
+ (("(.*)==(.*)$" _ dep ver)
+ (string-append dep ">=" ver))))))))
+ (propagated-inputs (list python-colorama))
+ (native-inputs (list python-coverage python-nose python-pylint python-tox))
+ (home-page "https://github.com/manrajgrover/py-log-symbols")
+ (synopsis "Python library with graphical symbols for logging on the terminal")
+ (description "This package provides a Python library with graphical symbols
+that can be displayed on the terminal, with color if possible, for logging
+purposes.")
+ (license license:expat)))
+
(define-public python-spinners
(package
(name "python-spinners")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 5/8] gnu: Add python-hjson.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-5-jean@foundationdevices.com
* gnu/packages/python-xyz.scm (python-hjson): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index db3e69fb45..91dbbe7d83 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf@dlr.de>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2166,6 +2167,30 @@ (define-public python-h5py
concepts.")
(license license:bsd-3)))
+(define-public python-hjson
+ ;; Using commit from master branch as the PyPI version does not contain
+ ;; the hjson/tests/ directory.
+ (let ((revision "0")
+ (commit "1687b811fcbbc54b5ac71cfbaa99f805e406fbcb"))
+ (package
+ (name "python-hjson")
+ (version (git-version "3.1.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hjson/hjson-py")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qfqnhvfx5mm7bdajjnnagmvns1zxyksjzh3k5la2ag6a8bp5gki"))))
+ (build-system pyproject-build-system)
+ (home-page "http://github.com/hjson/hjson-py")
+ (synopsis "Python package to parse HJSON documents")
+ (description "This package provides a Python library and a command-line
+interface utility to parse @url{https://hjson.github.io/, HJSON}) documents.")
+ (license license:expat))))
+
(define-public python-hnswlib
(package
(name "python-hnswlib")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 6/8] gnu: Add python-dotty-dict.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-6-jean@foundationdevices.com
* gnu/packages/python-xyz.scm (python-dotty-dict): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 91dbbe7d83..a6d789aacf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -625,6 +625,25 @@ (define-public python-dotmap
dictionary, can be convert to a dictionary, and is ordered by insertion.")
(license license:expat)))
+(define-public python-dotty-dict
+ (package
+ (name "python-dotty-dict")
+ (version "1.3.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "dotty_dict" version))
+ (sha256
+ (base32
+ "058sah2nyg44xq5wxywlzc3abzcv9fifnlvsflwma9mfp01nw0ab"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-poetry-core))
+ (home-page "https://github.com/pawelzny/dotty_dict")
+ (synopsis "Python library for accessing dictionaries using a dot syntax")
+ (description "This package provides a library that wraps the traditional
+Python dictionaries and provides a syntax to access nested dictionaries values
+using a dot syntax, for example: @code{dictionary['deeply.nested.key']}.")
+ (license license:expat)))
+
(define-public python-twodict
(package
(name "python-twodict")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 7/8] gnu: Add python-milc.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-7-jean@foundationdevices.com
* gnu/packages/python-xyz.scm (python-milc): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a6d789aacf..72f1936732 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4234,6 +4234,26 @@ (define-public python-extras
"Extras is a set of extensions to the Python standard library.")
(license license:expat)))
+(define-public python-milc
+ (package
+ (name "python-milc")
+ (version "1.6.8")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "milc" version))
+ (sha256
+ (base32
+ "1pnwdg2653lc82qsv6c0kv9qcydh2f6w5mx5l4227zy1f6kr7b52"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-appdirs python-argcomplete python-colorama
+ python-halo python-spinners))
+ (home-page "https://github.com/clueboard/milc")
+ (synopsis "Python library for command line interface programs")
+ (description "MILC is a Python library for developing command line
+interface programs. This library provides features to parse arguments,
+automatic tab-completion, color support, logging to @code{std}, etc.")
+ (license license:expat)))
+
(define-public python-mimeparse
(package
(name "python-mimeparse")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 4/8] gnu: Add python-halo.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-4-jean@foundationdevices.com
* gnu/packages/terminals.scm (python-halo): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/terminals.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index bfb333aba9..8df3fedfd6 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -1178,6 +1178,27 @@ (define-public python-curtsies
per-line fullscreen terminal rendering, and keyboard input event reporting.")
(license license:expat)))
+(define-public python-halo
+ (package
+ (name "python-halo")
+ (version "0.0.31")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "halo" version))
+ (sha256
+ (base32
+ "1mn97h370ggbc9vi6x8r6akd5q8i512y6kid2nvm67g93r9a6rvv"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-colorama python-log-symbols python-six
+ python-spinners python-termcolor))
+ (native-inputs (list python-coverage python-nose python-pylint python-tox
+ python-twine))
+ (home-page "https://github.com/manrajgrover/halo")
+ (synopsis "Python library to display graphical spinners in the terminal.")
+ (description "Halo is a Python library to display graphical spinners in
+the terminal. It also supports IPython/Jupyter.")
+ (license license:expat)))
+
(define-public python-log-symbols
(package
(name "python-log-symbols")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 27 Jul 2023 14:57
[PATCH 8/8] gnu: Add qmk.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230727125741.8766-8-jean@foundationdevices.com
* gnu/packages/firmware.scm (qmk): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/firmware.scm | 26 ++++++++++++++++++++++++++
gnu/packages/hardware.scm | 1 +
2 files changed, 27 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 35d3100ac6..82fb9c582f 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +35,8 @@ (define-module (gnu packages firmware)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system python)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
@@ -68,6 +71,7 @@ (define-module (gnu packages firmware)
#:use-module (gnu packages polkit)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages shells)
#:use-module (gnu packages sqlite)
@@ -1215,3 +1219,25 @@ (define-public crust-pinebook
(define-public crust-pine64-plus
(make-crust-package "pine64_plus"))
+
+(define-public qmk
+ (package
+ (name "qmk")
+ (version "1.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "qmk" version))
+ (sha256
+ (base32
+ "1619q9v90740dbg8xpzqlhwcasz42xj737803aiip8qc3a7zhwgq"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;; No tests.
+ (propagated-inputs (list python-dotty-dict python-hid python-hjson
+ python-jsonschema python-milc python-pillow
+ python-pygments python-pyserial python-pyusb
+ python-setuptools))
+ (home-page "https://qmk.fm")
+ (synopsis "Command line utility to manage QMK keyboard firmwares")
+ (description "This package provides a program to help users work with
+@acronym{QMK, Quantum Mechanical Keyboard} firmwares.")
+ (license license:expat)))
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index ed000d7fbd..f8978d1ee5 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -80,6 +80,7 @@ (define-module (gnu packages hardware)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:23
[PATCH v2 0/8] gnu: Add qmk.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-1-jean@foundationdevices.com
V2 of the patch series as the first one contained an error in the last
patch.


Jean-Pierre De Jesus DIAZ (8):
gnu: Add python-hid.
gnu: Add python-spinners.
gnu: Add python-log-symbols.
gnu: Add python-halo.
gnu: Add python-hjson.
gnu: Add python-dotty-dict.
gnu: Add python-milc.
gnu: Add qmk.

gnu/packages/firmware.scm | 26 +++++++++++++
gnu/packages/libusb.scm | 37 ++++++++++++++++++
gnu/packages/python-xyz.scm | 64 ++++++++++++++++++++++++++++++
gnu/packages/terminals.scm | 77 +++++++++++++++++++++++++++++++++++++
4 files changed, 204 insertions(+)


base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:23
[PATCH v2 1/8] gnu: Add python-hid.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-2-jean@foundationdevices.com
* gnu/packages/libusb.scm (python-hid): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 13090d30ab..c80e7061ad 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -653,6 +654,42 @@ (define-public hidapi
license:bsd-3
(license:non-copyleft "file://LICENSE-orig.txt")))))
+(define-public python-hid
+ (package
+ (name "python-hid")
+ (version "1.0.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "hid" version))
+ (sha256
+ (base32
+ "1s5hvfbmnlmifswr5514f4xxn5rcd429bdcdqzgwkdxrg9zlx58y"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; No tests present on the source tree, without this compilation fails
+ ;; because it "requires" the python-nose package, but it is not really
+ ;; necessary.
+ (list #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-extra-library-paths
+ (lambda _
+ (let ((libhidapi-hidraw.so
+ #$(file-append hidapi "/lib/libhidapi-hidraw.so"))
+ (libhidapi-libusb.so
+ #$(file-append hidapi "/lib/libhidapi-libusb.so")))
+ (substitute* "hid/__init__.py"
+ (("library_paths = \\(.*$" all)
+ (string-append
+ all
+ " '" libhidapi-hidraw.so "',\n"
+ " '" libhidapi-libusb.so "',\n")))))))))
+ (inputs (list hidapi))
+ (home-page "https://github.com/apmorton/pyhidapi")
+ (synopsis "Python @code{ctypes} bindings for HIDAPI library")
+ (description "Python @code{ctypes} bindings for HIDAPI library.")
+ (license license:expat)))
+
(define-public python-hidapi
(package
(name "python-hidapi")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:23
[PATCH v2 2/8] gnu: Add python-spinners.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-3-jean@foundationdevices.com
* gnu/packages/terminals.scm (python-spinners): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 9b705c874f..8f7e3c0e9a 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 Felipe Balbi <balbi@kernel.org>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,6 +99,7 @@ (define-module (gnu packages terminals)
#:use-module (gnu packages popt)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
@@ -1176,6 +1178,32 @@ (define-public python-curtsies
per-line fullscreen terminal rendering, and keyboard input event reporting.")
(license license:expat)))
+(define-public python-spinners
+ (package
+ (name "python-spinners")
+ (version "0.0.24")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "spinners" version))
+ (sha256
+ (base32
+ "0zz2z6dpdjdq5z8m8w8dfi8by0ih1zrdq0caxm1anwhxg2saxdhy"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "requirements-dev.txt"
+ (("(.*)==(.*)$" _ dep ver)
+ (string-append dep ">=" ver))))))))
+ (native-inputs (list python-coverage python-nose python-pylint python-tox))
+ (home-page "https://github.com/manrajgrover/py-spinners")
+ (synopsis "Python library with graphical spinners for the terminal")
+ (description "Spinners is a Python library that contains graphical spinners
+that can be displayed terminal.")
+ (license license:expat)))
+
(define-public tmate
(package
(name "tmate")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:23
[PATCH v2 3/8] gnu: Add python-log-symbols.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-4-jean@foundationdevices.com
* gnu/packages/terminals.scm (python-log-symbols): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 8f7e3c0e9a..bfb333aba9 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -1178,6 +1178,34 @@ (define-public python-curtsies
per-line fullscreen terminal rendering, and keyboard input event reporting.")
(license license:expat)))
+(define-public python-log-symbols
+ (package
+ (name "python-log-symbols")
+ (version "0.0.14")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "log_symbols" version))
+ (sha256
+ (base32
+ "0mh5d0igw33libfmbsr1ri1p1y644p36nwaa2w6kzrd8w5pvq2yg"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "requirements-dev.txt"
+ (("(.*)==(.*)$" _ dep ver)
+ (string-append dep ">=" ver))))))))
+ (propagated-inputs (list python-colorama))
+ (native-inputs (list python-coverage python-nose python-pylint python-tox))
+ (home-page "https://github.com/manrajgrover/py-log-symbols")
+ (synopsis "Python library with graphical symbols for logging on the terminal")
+ (description "This package provides a Python library with graphical symbols
+that can be displayed on the terminal, with color if possible, for logging
+purposes.")
+ (license license:expat)))
+
(define-public python-spinners
(package
(name "python-spinners")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:23
[PATCH v2 4/8] gnu: Add python-halo.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-5-jean@foundationdevices.com
* gnu/packages/terminals.scm (python-halo): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/terminals.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index bfb333aba9..8df3fedfd6 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -1178,6 +1178,27 @@ (define-public python-curtsies
per-line fullscreen terminal rendering, and keyboard input event reporting.")
(license license:expat)))
+(define-public python-halo
+ (package
+ (name "python-halo")
+ (version "0.0.31")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "halo" version))
+ (sha256
+ (base32
+ "1mn97h370ggbc9vi6x8r6akd5q8i512y6kid2nvm67g93r9a6rvv"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-colorama python-log-symbols python-six
+ python-spinners python-termcolor))
+ (native-inputs (list python-coverage python-nose python-pylint python-tox
+ python-twine))
+ (home-page "https://github.com/manrajgrover/halo")
+ (synopsis "Python library to display graphical spinners in the terminal.")
+ (description "Halo is a Python library to display graphical spinners in
+the terminal. It also supports IPython/Jupyter.")
+ (license license:expat)))
+
(define-public python-log-symbols
(package
(name "python-log-symbols")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:24
[PATCH v2 5/8] gnu: Add python-hjson.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-6-jean@foundationdevices.com
* gnu/packages/python-xyz.scm (python-hjson): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index db3e69fb45..91dbbe7d83 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf@dlr.de>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2166,6 +2167,30 @@ (define-public python-h5py
concepts.")
(license license:bsd-3)))
+(define-public python-hjson
+ ;; Using commit from master branch as the PyPI version does not contain
+ ;; the hjson/tests/ directory.
+ (let ((revision "0")
+ (commit "1687b811fcbbc54b5ac71cfbaa99f805e406fbcb"))
+ (package
+ (name "python-hjson")
+ (version (git-version "3.1.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hjson/hjson-py")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qfqnhvfx5mm7bdajjnnagmvns1zxyksjzh3k5la2ag6a8bp5gki"))))
+ (build-system pyproject-build-system)
+ (home-page "http://github.com/hjson/hjson-py")
+ (synopsis "Python package to parse HJSON documents")
+ (description "This package provides a Python library and a command-line
+interface utility to parse @url{https://hjson.github.io/, HJSON}) documents.")
+ (license license:expat))))
+
(define-public python-hnswlib
(package
(name "python-hnswlib")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:24
[PATCH v2 6/8] gnu: Add python-dotty-dict.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-7-jean@foundationdevices.com
* gnu/packages/python-xyz.scm (python-dotty-dict): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 91dbbe7d83..a6d789aacf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -625,6 +625,25 @@ (define-public python-dotmap
dictionary, can be convert to a dictionary, and is ordered by insertion.")
(license license:expat)))
+(define-public python-dotty-dict
+ (package
+ (name "python-dotty-dict")
+ (version "1.3.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "dotty_dict" version))
+ (sha256
+ (base32
+ "058sah2nyg44xq5wxywlzc3abzcv9fifnlvsflwma9mfp01nw0ab"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-poetry-core))
+ (home-page "https://github.com/pawelzny/dotty_dict")
+ (synopsis "Python library for accessing dictionaries using a dot syntax")
+ (description "This package provides a library that wraps the traditional
+Python dictionaries and provides a syntax to access nested dictionaries values
+using a dot syntax, for example: @code{dictionary['deeply.nested.key']}.")
+ (license license:expat)))
+
(define-public python-twodict
(package
(name "python-twodict")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:24
[PATCH v2 7/8] gnu: Add python-milc.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-8-jean@foundationdevices.com
* gnu/packages/python-xyz.scm (python-milc): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a6d789aacf..72f1936732 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4234,6 +4234,26 @@ (define-public python-extras
"Extras is a set of extensions to the Python standard library.")
(license license:expat)))
+(define-public python-milc
+ (package
+ (name "python-milc")
+ (version "1.6.8")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "milc" version))
+ (sha256
+ (base32
+ "1pnwdg2653lc82qsv6c0kv9qcydh2f6w5mx5l4227zy1f6kr7b52"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-appdirs python-argcomplete python-colorama
+ python-halo python-spinners))
+ (home-page "https://github.com/clueboard/milc")
+ (synopsis "Python library for command line interface programs")
+ (description "MILC is a Python library for developing command line
+interface programs. This library provides features to parse arguments,
+automatic tab-completion, color support, logging to @code{std}, etc.")
+ (license license:expat)))
+
(define-public python-mimeparse
(package
(name "python-mimeparse")
--
2.34.1
J
J
Jean-Pierre De Jesus DIAZ wrote on 28 Jul 2023 14:24
[PATCH v2 8/8] gnu: Add qmk.
(address . 64896@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
20230728122403.10140-9-jean@foundationdevices.com
* gnu/packages/firmware.scm (qmk): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/firmware.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 35d3100ac6..82fb9c582f 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +35,8 @@ (define-module (gnu packages firmware)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system python)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
@@ -68,6 +71,7 @@ (define-module (gnu packages firmware)
#:use-module (gnu packages polkit)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages shells)
#:use-module (gnu packages sqlite)
@@ -1215,3 +1219,25 @@ (define-public crust-pinebook
(define-public crust-pine64-plus
(make-crust-package "pine64_plus"))
+
+(define-public qmk
+ (package
+ (name "qmk")
+ (version "1.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "qmk" version))
+ (sha256
+ (base32
+ "1619q9v90740dbg8xpzqlhwcasz42xj737803aiip8qc3a7zhwgq"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;; No tests.
+ (propagated-inputs (list python-dotty-dict python-hid python-hjson
+ python-jsonschema python-milc python-pillow
+ python-pygments python-pyserial python-pyusb
+ python-setuptools))
+ (home-page "https://qmk.fm")
+ (synopsis "Command line utility to manage QMK keyboard firmwares")
+ (description "This package provides a program to help users work with
+@acronym{QMK, Quantum Mechanical Keyboard} firmwares.")
+ (license license:expat)))
--
2.34.1
V
V
Vagrant Cascadian wrote on 30 Aug 2023 02:19
Re: [bug#64896] [PATCH 0/8] gnu: Add qmk.
877cpdv0u7.fsf@wireframe
On 2023-07-27, Jean-Pierre De Jesus DIAZ wrote:
Toggle quote (15 lines)
> This patch series add support for the QMK command line utility which is used
> to manage the firmware of keyboards supporting QMK firmwares.
>
> CC'ed embedded and python teams.
>
> Jean-Pierre De Jesus DIAZ (8):
> gnu: Add python-hid.
> gnu: Add python-spinners.
> gnu: Add python-log-symbols.
> gnu: Add python-halo.
> gnu: Add python-hjson.
> gnu: Add python-dotty-dict.
> gnu: Add python-milc.
> gnu: Add qmk.

Thanks for the contribution!

Pushed as 74d72046bdc1ed6c859565570d0db58d20c9ddd7 with some minor
fixes that guix lint caught:

* python-hjson: Use https for home page.
* python-halo: Fix stray . in synopsis.
* qmk: Drop python-setuptools from propagated-inputs.

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZO6LAAAKCRDcUY/If5cW
qva9AP9K750YXrz7qPWHfFtVXJL4/UDeg3vhRz7nMMFZtCFe9wEAgFhYenFs9jdG
4bSdc0BMXouVpGcjnCRhfgkPNu4Hegc=
=FBt8
-----END PGP SIGNATURE-----

Closed
?