Subject: [PATCH 8/8] gnu: Add qmk.

From: Jean-Pierre De Jesus DIAZ <[email-masked]>
Date: Thu, 27 Jul 2023 14:57:41 +0200

* gnu/packages/firmware.scm (qmk): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <[email-masked]>
---
 gnu/packages/firmware.scm | 26 ++++++++++++++++++++++++++
 gnu/packages/hardware.scm |  1 +
 2 files changed, 27 insertions(+)

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 <[email-masked]>
 ;;; Copyright © 2021 Petr Hodina <[email-masked]>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2023 Foundation Devices, Inc. <[email-masked]>
 ;;;
 ;;; 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