aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/firmware.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-09 16:44:22 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-09 16:46:34 +0100
commit6cae1db889f62051580d5a365f62585412a53a8c (patch)
tree4d3db074d50ca3e2109cced17bec77f207a0c1fd /gnu/packages/firmware.scm
parent410e699e0933653e69d03a4cdadf11854c6723f4 (diff)
parent35e1d9247e39f3c91512cf3d9ef1467962389e35 (diff)
downloadguix-6cae1db889f62051580d5a365f62585412a53a8c.tar.gz
guix-6cae1db889f62051580d5a365f62585412a53a8c.zip
Merge remote-tracking branch 'savannah/master' into mesa-updates
Change-Id: Iad185e2ced97067b3dff8fd722435a6c5e2c00e5
Diffstat (limited to 'gnu/packages/firmware.scm')
-rw-r--r--gnu/packages/firmware.scm25
1 files changed, 18 insertions, 7 deletions
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 828bc7402a..21df5cd8f2 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1503,14 +1503,16 @@ having to run @command{qmk} as root when flashing the firmware.")
(define* (make-qmk-firmware/implementation keyboard keymap
#:key (description "")
keymap-json
- keymap-source-directory)
+ keymap-source-directory
+ keyboard-source-directory)
"Return a package to build the QMK firmware for KEYBOARD with KEYMAP.
-Keyboard should be the name of a sub-directory under the @file{keyboards}
-directory. For custom keymaps, KEYMAP-JSON, a file-like object of a JSON
-representation of KEYMAP as generated by the @url{https://config.qmk.fm/, QMK
-Configurator} tool or KEYMAP-SOURCE-DIRECTORY, a file-like object directory
-containing the keymap source files files such as @file{keymap.c}, can be
-provided."
+Keyboard should be the name of a sub-directory under the @file{keyboards} directory.
+For custom keymaps, KEYMAP-JSON, a file-like object of a JSON representation of
+KEYMAP as generated by the @url{https://config.qmk.fm/, QMK Configurator} tool or
+KEYMAP-SOURCE-DIRECTORY, a file-like object directory containing the keymap source
+files files such as @file{keymap.c}, can be provided. For keyboards not available in
+upstream repository, provide a file-like object directory containing the whole
+keyboard definition in KEYBOARD-SOURCE-DIRECTORY."
(package
(name (string-append "qmk-firmware-"
(string-replace-substring keyboard "_" "-") "-"
@@ -1570,6 +1572,15 @@ provided."
(base32
"1rmhm4rxvq8skxqn6vc4n4ly1ak6whj7c386zbsci4pxx548n9h4"))))
"lib/lufa")))
+ #$@(if keyboard-source-directory
+ #~((add-after 'unpack 'copy-keyboard-source-directory
+ (lambda _
+ (let ((keyboard-dir #$(string-append "keyboards/" keyboard)))
+ (false-if-exception (delete-file-recursively
+ keyboard-dir))
+ (copy-recursively #$keyboard-source-directory
+ keyboard-dir)))))
+ #~())
#$@(if keymap-source-directory
#~((add-after 'unpack 'copy-keymap-source-directory
(lambda _