* [bug#42682] [PATCH 0/2] Qmk cli
@ 2020-08-02 20:42 Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
` (4 more replies)
0 siblings, 5 replies; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-02 20:42 UTC (permalink / raw)
To: 42682; +Cc: Jan Wielkiewicz
Hello,
these patches add qmk-cli - a command line utility helping its users to mofify
and flash qmk firmware on input devices like keyboards or mouses.
I also add one python dependency.
Project's website: https://qmk.fm/
Jan Wielkiewicz (2):
gnu: Add python-hjson.
gnu: Add qmk-cli.
gnu/packages/hardware.scm | 50 +++++++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 20 +++++++++++++++
2 files changed, 70 insertions(+)
Jan Wielkiewicz
--
2.28.0
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 1/2] gnu: Add python-hjson.
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
@ 2020-08-02 20:49 ` Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 2/2] gnu: Add qmk-cli Jan Wielkiewicz
2020-08-03 8:21 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Mathieu Othacehe
2022-12-22 12:29 ` [bug#42682] [PATCH 0/2] Qmk cli Marcel van der Boom
` (3 subsequent siblings)
4 siblings, 2 replies; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-02 20:49 UTC (permalink / raw)
To: 42682; +Cc: Jan Wielkiewicz
* gnu/packages/python-xyz.scm (python-hjson): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9ab0b12383..316865ddf1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -83,6 +83,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21298,3 +21299,22 @@ and have a maximum lifetime built-in.")
"This package contains a small collection of test tool plugins for
@code{nose2} and @code{flake8}.")
(license license:asl2.0)))
+
+(define-public python-hjson
+ (package
+ (name "python-hjson")
+ (version "3.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hjson" version))
+ (sha256
+ (base32
+ "1yaimcgz8w0ps1wk28wk9g9zdidp79d14xqqj9rjkvxalvx2f5qx"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f)) ; no tests
+ (home-page "http://github.com/hjson/hjson-py")
+ (synopsis "User interface for JSON.")
+ (description "Hjson, a user interface for JSON.")
+ (license license:expat)))
--
2.28.0
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
@ 2020-08-02 20:49 ` Jan Wielkiewicz
2020-08-03 8:26 ` Mathieu Othacehe
2020-08-03 8:21 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Mathieu Othacehe
1 sibling, 1 reply; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-02 20:49 UTC (permalink / raw)
To: 42682; +Cc: Jan Wielkiewicz
* gnu/packages/hardware.scm (qmk-cli): New variable.
---
gnu/packages/hardware.scm | 50 +++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 211a5a34ac..adab986d75 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +20,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages hardware)
+ #:use-module (gnu packages avr)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
@@ -27,6 +29,8 @@
#:use-module (gnu packages cpp)
#:use-module (gnu packages crypto)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages embedded)
+ #:use-module (gnu packages flashing-tools)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages libusb)
@@ -36,10 +40,14 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages polkit)
#:use-module (gnu packages protobuf)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -465,3 +473,45 @@ authorization policies (what kind of USB devices are authorized) as well as
method of use policies (how a USB device may interact with the system).
Simply put, it is a USB device whitelisting tool.")
(license license:gpl2)))
+
+(define-public qmk-cli
+ (package
+ (name "qmk-cli")
+ (version "0.0.35")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "qmk" version))
+ (sha256
+ (base32
+ "1dd3q38r5bs9ih8jiwsb7q2655wyka2a8wlwv7yln9narlqwl177"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("arm-none-eabi-gcc" ,gcc-arm-none-eabi-7-2018-q2-update)
+ ("avr-gcc" ,avr-toolchain-5)
+ ("avrdude" ,avrdude)
+ ("dfu-programmer" ,dfu-programmer)
+ ("dfu-util" ,dfu-util)
+ ("git" ,git)
+ ("python3" ,python)
+ ("python-appdirs" ,python-appdirs)
+ ("python-argcomplete" ,python-argcomplete)
+ ("python-colorama" ,python-colorama)
+ ("python-flake8" ,python-flake8)
+ ("python-hjson" ,python-hjson)
+ ("python-nose2" ,python-nose2)
+ ("python-yapf" ,python-yapf)))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'check 'set-qmk-home
+ (lambda _
+ ;; tests fail without this variable set
+ (setenv "QMK_HOME"
+ "")
+ #t)))))
+ (home-page "https://github.com/qmk/qmk_cli")
+ (synopsis
+ "Tools for developing QMK Firmware")
+ (description
+ "A program to help users work with QMK Firmware.")
+ (license license:expat)))
--
2.28.0
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 1/2] gnu: Add python-hjson.
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 2/2] gnu: Add qmk-cli Jan Wielkiewicz
@ 2020-08-03 8:21 ` Mathieu Othacehe
2020-08-03 12:28 ` Jan Wielkiewicz
1 sibling, 1 reply; 38+ messages in thread
From: Mathieu Othacehe @ 2020-08-03 8:21 UTC (permalink / raw)
To: Jan Wielkiewicz; +Cc: 42682
Hello Jan,
Thanks for this patch. Please make sure to run the linter that reports
two warnings here.
> +(define-public python-hjson
> + (package
> + (name "python-hjson")
> + (version "3.0.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "hjson" version))
> + (sha256
> + (base32
> + "1yaimcgz8w0ps1wk28wk9g9zdidp79d14xqqj9rjkvxalvx2f5qx"))))
> + (build-system python-build-system)
> + (arguments
> + '(#:tests? #f)) ; no tests
> + (home-page "http://github.com/hjson/hjson-py")
> + (synopsis "User interface for JSON.")
> + (description "Hjson, a user interface for JSON.")
You need to elaborate on that with at least two or three sentences,
explaining what is this user interface and what does it bring.
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-02 20:49 ` [bug#42682] [PATCH 2/2] gnu: Add qmk-cli Jan Wielkiewicz
@ 2020-08-03 8:26 ` Mathieu Othacehe
2020-08-03 12:43 ` Jan Wielkiewicz
0 siblings, 1 reply; 38+ messages in thread
From: Mathieu Othacehe @ 2020-08-03 8:26 UTC (permalink / raw)
To: Jan Wielkiewicz; +Cc: 42682
> + (propagated-inputs
> + `(("arm-none-eabi-gcc" ,gcc-arm-none-eabi-7-2018-q2-update)
> + ("avr-gcc" ,avr-toolchain-5)
> + ("avrdude" ,avrdude)
> + ("dfu-programmer" ,dfu-programmer)
> + ("dfu-util" ,dfu-util)
> + ("git" ,git)
> + ("python3" ,python)
> + ("python-appdirs" ,python-appdirs)
> + ("python-argcomplete" ,python-argcomplete)
> + ("python-colorama" ,python-colorama)
> + ("python-flake8" ,python-flake8)
> + ("python-hjson" ,python-hjson)
> + ("python-nose2" ,python-nose2)
> + ("python-yapf" ,python-yapf)))
Do we really need to propagate all those inputs? Can't we hardcode the
path to those tools directly in the sources, if they are not registered at
build time?
> + (arguments
> + `(#:phases (modify-phases %standard-phases
> + (add-before 'check 'set-qmk-home
> + (lambda _
> + ;; tests fail without this variable set
> + (setenv "QMK_HOME"
> + "")
Who is supposed to set it otherwise?
> + "A program to help users work with QMK Firmware.")
You also need to elaborate here :)
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 1/2] gnu: Add python-hjson.
2020-08-03 8:21 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Mathieu Othacehe
@ 2020-08-03 12:28 ` Jan Wielkiewicz
0 siblings, 0 replies; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-03 12:28 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 42682
Dnia 2020-08-03, o godz. 10:21:11
Mathieu Othacehe <othacehe@gnu.org> napisał(a):
>
> Hello Jan,
>
> Thanks for this patch. Please make sure to run the linter that reports
> two warnings here.
Okay. I'll check that.
>
> You need to elaborate on that with at least two or three sentences,
> explaining what is this user interface and what does it bring.
To be honest, I'm not sure what they mean by "user interface to JSON".
They vaguely explain this on their website https://hjson.github.io/
I'm also not sure if I'm permited to just copy and paste text from
their website because of copyright.
My English is also sloppy sometimes and I fail to write meaningful
description about too abstract things.
I can try diving in and check what it does, but I don't have any
experience with Python.
> Thanks,
>
> Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-03 8:26 ` Mathieu Othacehe
@ 2020-08-03 12:43 ` Jan Wielkiewicz
2020-08-05 9:17 ` Mathieu Othacehe
0 siblings, 1 reply; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-03 12:43 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 42682
Dnia 2020-08-03, o godz. 10:26:03
Mathieu Othacehe <othacehe@gnu.org> napisał(a):
>
> > + (propagated-inputs
> > + `(("arm-none-eabi-gcc" ,gcc-arm-none-eabi-7-2018-q2-update)
> > + ("avr-gcc" ,avr-toolchain-5)
> > + ("avrdude" ,avrdude)
> > + ("dfu-programmer" ,dfu-programmer)
> > + ("dfu-util" ,dfu-util)
> > + ("git" ,git)
> > + ("python3" ,python)
> > + ("python-appdirs" ,python-appdirs)
> > + ("python-argcomplete" ,python-argcomplete)
> > + ("python-colorama" ,python-colorama)
> > + ("python-flake8" ,python-flake8)
> > + ("python-hjson" ,python-hjson)
> > + ("python-nose2" ,python-nose2)
> > + ("python-yapf" ,python-yapf)))
>
> Do we really need to propagate all those inputs?
The python dependencies were added to propagated inputs automatically
by "guix import". The other tools are needed in the user profine,
because qmk-cli uses them, for example it fetches qmk firmware from
git, it runs some *python stuff* and when user is done making changes
to their firmware, qmk cli builds the firmware using the compiler and
flashes it using dfu.
I think it would be cool if Guix allowed defining profiles and
environments the same way it allows defining packages.
This way installing qmk-cli would also install say qmk-profile with all
headers (and tools) needed for development. Now, even though
arv-toolchain is installed, I have to run "guix environment qmk-cli" to
be able to work with the firmware without getting build errors.
> Can't we hardcode the
> path to those tools directly in the sources, if they are not
> registered at build time?
I need them installed, so qmk-cli doesn't complain. Should the user be
responsible for installing all the tools needed for development?
> > + (arguments
> > + `(#:phases (modify-phases %standard-phases
> > + (add-before 'check 'set-qmk-home
> > + (lambda _
> > + ;; tests fail without this variable set
> > + (setenv "QMK_HOME"
> > + "")
>
> Who is supposed to set it otherwise?
I'm not sure. That's the first thing qmk-cli sets when it is already
installed. Normally, qmk-cli is installed by pip, maybe it is
responsible for setting the variables?
> > + "A program to help users work with QMK Firmware.")
>
> You also need to elaborate here :)
Should I describe what qmk firmware is or say more about what working
with qmk firmware is, or both?
> Thanks,
>
> Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-03 12:43 ` Jan Wielkiewicz
@ 2020-08-05 9:17 ` Mathieu Othacehe
2020-08-05 12:22 ` Jan Wielkiewicz
0 siblings, 1 reply; 38+ messages in thread
From: Mathieu Othacehe @ 2020-08-05 9:17 UTC (permalink / raw)
To: Jan Wielkiewicz; +Cc: 42682
Hello Jan,
>> Do we really need to propagate all those inputs?
> The python dependencies were added to propagated inputs automatically
> by "guix import". The other tools are needed in the user profine,
> because qmk-cli uses them, for example it fetches qmk firmware from
> git, it runs some *python stuff* and when user is done making changes
> to their firmware, qmk cli builds the firmware using the compiler and
> flashes it using dfu.
Turns out qmk_cli is just a wrapper around qmk_firmware. It clones qmk
firmware repository because it cannot locate a qmk_firmware directory
using QMK_HOME variable.
I think the proper way to do things would be to package qmk_firwmare
first (it has a root shell.nix file that should help). Then this package
would define QMK_HOME using "search-paths".
This way, qmk_cli would just require some python libraries, but would
not propagate git, and the toolchains.
Does it make sense?
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-05 9:17 ` Mathieu Othacehe
@ 2020-08-05 12:22 ` Jan Wielkiewicz
2020-08-07 8:20 ` Mathieu Othacehe
0 siblings, 1 reply; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-05 12:22 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 42682
Dnia 2020-08-05, o godz. 11:17:43
Mathieu Othacehe <othacehe@gnu.org> napisał(a):
>
> Hello Jan,
>
> >> Do we really need to propagate all those inputs?
> > The python dependencies were added to propagated inputs
> > automatically by "guix import". The other tools are needed in the
> > user profine, because qmk-cli uses them, for example it fetches qmk
> > firmware from git, it runs some *python stuff* and when user is
> > done making changes to their firmware, qmk cli builds the firmware
> > using the compiler and flashes it using dfu.
>
> Turns out qmk_cli is just a wrapper around qmk_firmware. It clones qmk
> firmware repository because it cannot locate a qmk_firmware directory
> using QMK_HOME variable.
>
> I think the proper way to do things would be to package qmk_firwmare
> first (it has a root shell.nix file that should help). Then this
> package would define QMK_HOME using "search-paths".
>
> This way, qmk_cli would just require some python libraries, but would
> not propagate git, and the toolchains.
>
> Does it make sense?
But the entire point of qmk firmware is that the user configures it. I
had to modify the source code to make my keyboard work and add some
extra features like layouts, special keys. Your solution will only work
for the unmodified and default firmware, or is there a Guix solution
for it I'm not aware of, like a convenient interface for user defined
packages?
> Thanks,
>
> Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-05 12:22 ` Jan Wielkiewicz
@ 2020-08-07 8:20 ` Mathieu Othacehe
2020-08-07 15:44 ` Jan Wielkiewicz
0 siblings, 1 reply; 38+ messages in thread
From: Mathieu Othacehe @ 2020-08-07 8:20 UTC (permalink / raw)
To: Jan Wielkiewicz; +Cc: 42682
Hello,
> But the entire point of qmk firmware is that the user configures it. I
> had to modify the source code to make my keyboard work and add some
> extra features like layouts, special keys. Your solution will only work
> for the unmodified and default firmware, or is there a Guix solution
> for it I'm not aware of, like a convenient interface for user defined
> packages?
Oh I see. Nonetheless, qmk_cli is a thin wrapper around qmk_firmware. I
think it would make more sense to have qmk_firmware properly packaged.
This way we would offer people a way to build their customized firmware
without propagating toolchains and fetching a git repository.
WDYT?
Mathieu
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-07 8:20 ` Mathieu Othacehe
@ 2020-08-07 15:44 ` Jan Wielkiewicz
2021-02-05 11:39 ` Nicolò Balzarotti
0 siblings, 1 reply; 38+ messages in thread
From: Jan Wielkiewicz @ 2020-08-07 15:44 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 42682
Dnia 2020-08-07, o godz. 10:20:17
Mathieu Othacehe <othacehe@gnu.org> napisał(a):
>
> Hello,
>
> > But the entire point of qmk firmware is that the user configures
> > it. I had to modify the source code to make my keyboard work and
> > add some extra features like layouts, special keys. Your solution
> > will only work for the unmodified and default firmware, or is there
> > a Guix solution for it I'm not aware of, like a convenient
> > interface for user defined packages?
>
> Oh I see. Nonetheless, qmk_cli is a thin wrapper around qmk_firmware.
> I think it would make more sense to have qmk_firmware properly
> packaged.
>
> This way we would offer people a way to build their customized
> firmware without propagating toolchains and fetching a git repository.
>
> WDYT?
I can do this then, give me some time.
> Mathieu
Jan Wielkiewicz
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2020-08-07 15:44 ` Jan Wielkiewicz
@ 2021-02-05 11:39 ` Nicolò Balzarotti
2021-02-24 21:41 ` Jan Wielkiewicz
0 siblings, 1 reply; 38+ messages in thread
From: Nicolò Balzarotti @ 2021-02-05 11:39 UTC (permalink / raw)
To: Jan Wielkiewicz, Mathieu Othacehe; +Cc: 42682
Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl> writes:
> Dnia 2020-08-07, o godz. 10:20:17
> Mathieu Othacehe <othacehe@gnu.org> napisał(a):
>
>>
>> Hello,
>>
>> > But the entire point of qmk firmware is that the user configures
>> > it. I had to modify the source code to make my keyboard work and
>> > add some extra features like layouts, special keys. Your solution
>> > will only work for the unmodified and default firmware, or is there
>> > a Guix solution for it I'm not aware of, like a convenient
>> > interface for user defined packages?
>>
>> Oh I see. Nonetheless, qmk_cli is a thin wrapper around qmk_firmware.
>> I think it would make more sense to have qmk_firmware properly
>> packaged.
>>
>> This way we would offer people a way to build their customized
>> firmware without propagating toolchains and fetching a git repository.
>>
>> WDYT?
> I can do this then, give me some time.
>
>> Mathieu
>
>
> Jan Wielkiewicz
Hi Jan, have you been working on this? My new qmk-supported keyboard is
coming and I'd love to be able to flash it with guix.
I built qmk-firmware in guix (but there are bundled dependencies that
still need to be removed).
I was planning to use mugur with it, which calls
make -C source-path keyboard:type
So, my first idea (which should apply to qmk-cli too) was to patch this
to call guix build --with-source and hopefully get this working, but I
don't know how robust this is (or if it is even going to work).
(I'll also have to package https://github.com/zsa/wally, but it does not
seem to require qmk-cli)
Nicolò
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2021-02-05 11:39 ` Nicolò Balzarotti
@ 2021-02-24 21:41 ` Jan Wielkiewicz
2021-02-24 22:23 ` Nicolò Balzarotti
0 siblings, 1 reply; 38+ messages in thread
From: Jan Wielkiewicz @ 2021-02-24 21:41 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: Mathieu Othacehe, 42682
Dnia 2021-02-05, o godz. 12:39:55
Nicolò Balzarotti <anothersms@gmail.com> napisał(a):
> Hi Jan, have you been working on this? My new qmk-supported keyboard
> is coming and I'd love to be able to flash it with guix.
Nope, I'm quite busy studying right now, will resume my work this
summer.
> I built qmk-firmware in guix (but there are bundled dependencies that
> still need to be removed).
>
> I was planning to use mugur with it, which calls
>
> make -C source-path keyboard:type
>
> So, my first idea (which should apply to qmk-cli too) was to patch
> this to call guix build --with-source and hopefully get this working,
> but I don't know how robust this is (or if it is even going to work).
>
> (I'll also have to package https://github.com/zsa/wally, but it does
> not seem to require qmk-cli)
>
> Nicolò
I totally don't remember what the issue was about. If you have a
working package then go ahead.
Thanks for info anyway, I'll check it out later.
Jan Wielkiewicz
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 2/2] gnu: Add qmk-cli.
2021-02-24 21:41 ` Jan Wielkiewicz
@ 2021-02-24 22:23 ` Nicolò Balzarotti
0 siblings, 0 replies; 38+ messages in thread
From: Nicolò Balzarotti @ 2021-02-24 22:23 UTC (permalink / raw)
To: Jan Wielkiewicz; +Cc: Mathieu Othacehe, 42682
> I totally don't remember what the issue was about. If you have a
> working package then go ahead.
> Thanks for info anyway, I'll check it out later.
Ok, I'll send some patches in the following days :)
Thanks, Nicolo'
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH 0/2] Qmk cli
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
@ 2022-12-22 12:29 ` Marcel van der Boom
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (2 subsequent siblings)
4 siblings, 0 replies; 38+ messages in thread
From: Marcel van der Boom @ 2022-12-22 12:29 UTC (permalink / raw)
To: 42682
Is someone still working on this?
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 0/9] Add qmk-cli
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
2022-12-22 12:29 ` [bug#42682] [PATCH 0/2] Qmk cli Marcel van der Boom
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 1/9] gnu: Add python-hjson Fredrik Salomonsson
` (8 more replies)
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-08-19 0:34 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
4 siblings, 9 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
Hi,
Since it doesn't seem to be any activity on this issue I thought I'll pick up
where Jan left off. The cli program has grown quite a bit since the last
patch in term of dependencies and is now required for you to be able to build
QMK Firmware. I've only tested this with building my firmware for my
keyboard:
guix shell avr-toolchain dfu-programmer qmk-cli -- qmk flash -kb kyria -km plattfot -bl dfu-split-left
It seems to be working fine though as I'm still able to type after that. 🙂
I opted to not propagate any packages (e.g. avr-toolchain, git, dfu-programmer
etc) given that it depends on what you are going to use the qmk cli for. And
seems better to specify what you need as I've shown above when flashing my
keyboard.
I also added qmk-udev-rules to be able to use qmk cli without requiring root
when flashing.
I do get some warnings when running guix lint. Which I haven't figured out how
to resolve.
> gnu/packages/python-xyz.scm:27517:17: python-dotty-dict@1.3.1: use @code or
> similar ornament instead of quotes
Not sure what quotes it complains about as the quotes in the description are
wrapped in @code and is part of the code snippet.
> gnu/packages/python-xyz.scm:17147:15: python-milc@1.6.6: URI
> https://milc.clueboard.co/ returned suspiciously small file (337 bytes)
The url redirects to https://milc.clueboard.co/1.6, if I switch to that it
seems it still redirects.
> gnu/packages/hardware.scm:1416:12: qmk-udev-rules@0.20.5: the source file
> name should contain the package name
Not entirely sure what this mean, as the udev file is in the qmk_firmware
repo. Should I just redefine it using file-name in the origin declaration?
> gnu/packages/hardware.scm:1415:13: qmk-udev-rules@0.20.5: can be upgraded to 6.1
The latest release for qmk_firmware is 0.20.5, I'm suspecting it is grabbing
6.1 from the planck-6.1 tag. Can I just ignore this one?
Fredrik Salomonsson (9):
gnu: Add python-hjson.
gnu: Add python-log-symbols.
gnu: Add python-spinners.
gnu: Add python-halo.
gnu: Add python-milc.
gnu: Add python-dotty-dict.
gnu: Add python-hid.
gnu: Add qmk-cli.
gnu: Add qmk-udev-rules.
gnu/packages/hardware.scm | 73 ++++++++++++++
gnu/packages/libusb.scm | 56 +++++++++++
gnu/packages/python-xyz.scm | 193 ++++++++++++++++++++++++++++++++++++
3 files changed, 322 insertions(+)
base-commit: 5481aaacb5f60ba43d8db7e51cb7cc967d5eb55e
--
2.39.2
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 1/9] gnu: Add python-hjson.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
` (7 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/python-xyz.scm (python-hjson): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bd68d060b5..6ce8aa2072 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -135,6 +135,7 @@
;;; Copyright © 2023 Gabriel Wicki <gabriel@erlikon.ch>
;;; Copyright © 2023 Amade Nemes <nemesamade@gmail.com>
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
+;;; Copyright © 2023 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2413,6 +2414,25 @@ (define-public python-humanfriendly
helpers.")
(license license:expat)))
+(define-public python-hjson
+ (package
+ (name "python-hjson")
+ (version "3.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "hjson" version))
+ (sha256
+ (base32
+ "0xfgrnwr6xaqfkaxnzd06sw8zv6dpkbrk0w0kjbag0yg4xd4gbsm"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:tests? #f)) ; no tests
+ (home-page "https://github.com/hjson/hjson-py")
+ (synopsis "Hjson, the Human JSON user interface")
+ (description "This package provides a configuration file format that caters
+to humans and helps reduce the errors they make.")
+ (license license:expat)))
+
(define-public python-textparser
(package
(name "python-textparser")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 2/9] gnu: Add python-log-symbols.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 1/9] gnu: Add python-hjson Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 3/9] gnu: Add python-spinners Fredrik Salomonsson
` (6 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/python-xyz.scm (python-log-symbols): New variable.
---
gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6ce8aa2072..8b07486130 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15505,6 +15505,37 @@ (define-public python-colorama-for-awscli
(sha256
(base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
+(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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-requirements
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("requirements-dev.txt")
+ (("==") ">=")))))))
+ (native-inputs
+ (list python-tox
+ python-nose
+ python-coverage
+ python-pylint))
+ (propagated-inputs
+ (list python-colorama))
+ (home-page "https://github.com/manrajgrover/py-log-symbols")
+ (synopsis "Colored symbols for various log levels for Python")
+ (description "This package provides a Python module that generates colored symbols
+for info, success, warning and error log level.")
+ (license license:expat)))
(define-public python-moto
(package
(name "python-moto")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 3/9] gnu: Add python-spinners.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 1/9] gnu: Add python-hjson Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 4/9] gnu: Add python-halo Fredrik Salomonsson
` (5 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/python-xyz.scm (python-spinners): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8b07486130..d77a7324cc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15476,6 +15476,36 @@ (define-public python-progressbar33
;; Either or both of these licenses may be selected.
(license (list license:lgpl2.1+ license:bsd-3))))
+(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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-requirements
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("requirements-dev.txt")
+ (("==") ">=")))))))
+ (native-inputs
+ (list python-nose
+ python-coverage
+ python-tox
+ python-pylint))
+ (home-page "https://github.com/manrajgrover/py-spinners")
+ (synopsis "Spinners for terminals")
+ (description "This package provides more than 60 spinners for terminals. Is a
+python port of the node library cli-spinners.")
+ (license license:expat)))
+
(define-public python-colorama
(package
(name "python-colorama")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 4/9] gnu: Add python-halo.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (2 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 3/9] gnu: Add python-spinners Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 5/9] gnu: Add python-milc Fredrik Salomonsson
` (4 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/python-xyz.scm (python-halo): New variable.
---
gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d77a7324cc..2e9ab04389 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15566,6 +15566,37 @@ (define-public python-log-symbols
(description "This package provides a Python module that generates colored symbols
for info, success, warning and error log level.")
(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 python-build-system)
+ (native-inputs
+ (list python-tox
+ python-nose
+ python-coverage
+ python-pylint
+ python-twine))
+ (propagated-inputs
+ (list python-colorama
+ python-log-symbols
+ python-six
+ python-spinners
+ python-termcolor))
+ (home-page "https://github.com/manrajgrover/halo")
+ (synopsis "Beautiful terminal spinners in Python")
+ (description "This package provides a Python module that renders various
+fancy looking terminal spinners. The API allow to control color on text
+and/or spinner, what animation if text does not fit etc.")
+ (license license:expat)))
+
(define-public python-moto
(package
(name "python-moto")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 5/9] gnu: Add python-milc.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (3 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 4/9] gnu: Add python-halo Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
` (3 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/python-xyz.scm (python-milc): New variable.
---
gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2e9ab04389..715d531a8d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17126,6 +17126,51 @@ (define-public python-magic
the same purpose: to provide Python bindings for libmagic.")
(license license:expat)))
+(define-public python-milc
+ (package
+ (name "python-milc")
+ (version "1.6.6")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "milc" version))
+ (sha256
+ (base32
+ "007hdwp659s1wfld92pxdgjz9ijvh949wyf1cbmyzkma30vng8d4"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ (list
+ python-appdirs
+ python-argcomplete
+ python-colorama
+ python-halo
+ python-spinners))
+ (home-page "https://milc.clueboard.co/")
+ (synopsis "Opinionated Batteries-Included Python 3 CLI Framework")
+ (description "MILC is a framework for writing @acronym{CLI, Command Line Interface}
+applications in Python 3.6+. It gives you all the features users
+expect from a modern CLI tool out of the box:
+@itemize @bullet
+@item
+CLI Argument Parsing, with or without subcommands.
+@item
+Automatic tab-completion support through argcomplete.
+@item
+Configuration file which can be overridden by CLI options.
+@item
+ANSI color support- even on Windows- with colorama.
+@item
+Logging to stderr and/or a file, with ANSI colors.
+@item
+Easy method for printing to stdout with ANSI colors
+@item
+Labeling log output with colored emoji to easily distinguish message types.
+@item
+Thread safety.
+@item
+More than 60 built-in spinners with the ability to add your own.
+@end itemize")
+ (license license:expat)))
+
(define-public s3cmd
(package
(name "s3cmd")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 6/9] gnu: Add python-dotty-dict.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (4 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 5/9] gnu: Add python-milc Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 7/9] gnu: Add python-hid Fredrik Salomonsson
` (2 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/python-xyz.scm (python-dotty-dict): New variable.
---
gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 715d531a8d..6207b360c7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27501,6 +27501,42 @@ (define-public python-dictpath
accessor layer.")
(license license:asl2.0)))
+(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 python-build-system)
+ (home-page "https://github.com/pawelzny/dotty_dict")
+ (synopsis "Dictionary wrapper for quick access to deeply nested keys")
+ (description "Has the following features:
+@itemize @bullet
+@item
+Simple wrapper around python dictionary and dict like objects.
+@item
+Two wrappers with the same dict are considered equal.
+@item
+Access to deeply nested keys with dot notation: @code{dot['deeply.nested.key']}.
+@item
+Create, read, update and delete nested keys of any length.
+@item
+Expose all dictionary methods like @code{.get}, @code{.pop}, @code{.keys} and other.
+@item
+Access dicts in lists by index @code{dot['parents.0.first_name']}.
+@item
+key=value caching to speed up lookups and low down memory consumption.
+@item
+Support for setting value in multidimensional lists.
+@item
+Support for accessing lists with slices.
+@end itemize")
+ (license license:expat)))
+
(define-public pyzo
(package
(name "pyzo")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 7/9] gnu: Add python-hid.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (5 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 8/9] gnu: Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/libusb.scm (python-hid): New variable.
---
gnu/packages/libusb.scm | 56 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index c009c78e88..266ab459a1 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 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages libusb)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages gnupg)
@@ -54,6 +56,7 @@ (define-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
#:use-module (gnu packages tls)
@@ -650,6 +653,59 @@ (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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-library-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("hid/__init__.py")
+ (("'libhidapi-hidraw.so'")
+ (string-append
+ "'" (search-input-file inputs "/lib/libhidapi-hidraw.so") "'"))
+ (("'libhidapi-libusb.so'")
+ (string-append
+ "'" (search-input-file inputs "/lib/libhidapi-libusb.so") "'"))
+ ;; Nuke the rest of the library_paths
+ (("[[:blank:]]+'libhidapi-hidraw.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-libusb.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-iohidmanager.so',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-iohidmanager.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi.dylib',\n")
+ "")
+ (("[[:blank:]]+'hidapi.dll',\n")
+ "")
+ (("[[:blank:]]+'hidapi-0.dll',\n")
+ "")))))))
+ (native-inputs
+ (list
+ python-nose
+ python-tox))
+ (inputs
+ (list
+ hidapi))
+ (home-page "https://github.com/apmorton/pyhidapi")
+ (synopsis "Ctypes bindings for hidapi")
+ (description "This package provides ctypes bindings in Python for the @code{hidapi}
+package. Note that this package conflicts with the
+@code{python-hidapi} package as they occupy the same Python namespace.")
+ (license license:expat)))
+
(define-public python-hidapi
(package
(name "python-hidapi")
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 8/9] gnu: Add qmk-cli.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (6 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 7/9] gnu: Add python-hid Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/hardware.scm (qmk-cli): New variable.
---
gnu/packages/hardware.scm | 49 +++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 299d7b96a1..1f8be61ca5 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 Spencer Skylar Chan <schan12@umd.edu>
+;;; Copyright © 2023 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,6 +77,8 @@ (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-check)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
@@ -90,10 +93,12 @@ (define-module (gnu packages hardware)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix gexp)
@@ -1359,3 +1364,47 @@ (define-public libcpuid
string, code name and other information from x86 CPU. This library is not to be
confused with the @code{cpuid} command line utility from package @code{cpuid}.")
(license license:bsd-2))))
+
+(define-public qmk-cli
+ (package
+ (name "qmk-cli")
+ (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)) ; test removed in pypi
+ (inputs
+ (list
+ python-hid
+ python-hjson
+ python-jsonschema-next
+ python-milc
+ python-pillow
+ python-pygments
+ python-pyserial
+ python-pyusb
+ python-dotty-dict
+ python-tox
+ python-wheel))
+ (home-page "https://qmk.fm")
+ (synopsis "Program to help users work with QMK Firmware")
+ (description
+ "This package provides a @acronym{CLI, command line interface} based
+program to help users work with QMK Firmware. Where QMK Firmware is
+an open firmware for custom keyboards, e.g. Planck, ErgoDox, Corne and
+many more. This @acronym{CLI} program is mainly used for building the
+QMK firmware, but also has some other convenience utilities. To be
+able to build a firmware also include the following packages:
+@code{avr-toolchain} and either @code{dfu-programmer} or
+@code{avrdude} depending on what microcontroller(s) is/are used for
+the keyboard. To be able to clone the QMK Firmware project using
+@command{qmk clone} include the @code{git} package. It is highly
+recommended to setup udev rules to avoid running this as root when
+flashing the firmware, see @code{qmk-udev-rules} and
+@code{udev-service-type}.")
+ (license license:expat)))
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v2 9/9] gnu: Add qmk-udev-rules.
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
` (7 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 8/9] gnu: Add qmk-cli Fredrik Salomonsson
@ 2023-04-09 4:31 ` Fredrik Salomonsson
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-04-09 4:31 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/hardware.scm (qmk-udev-rules): New variable.
---
gnu/packages/hardware.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 1f8be61ca5..eab3cf1b21 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1408,3 +1408,27 @@ (define-public qmk-cli
flashing the firmware, see @code{qmk-udev-rules} and
@code{udev-service-type}.")
(license license:expat)))
+
+(define-public qmk-udev-rules
+ (package
+ (name "qmk-udev-rules")
+ (version "0.20.5") ;; Using qmk_firmware's version
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/qmk/qmk_firmware")
+ (commit version)))
+ (sha256
+ (base32
+ "0v45xvmv351717y2v77fy26ivsnnhsl6ynd7v1pvprpkpf9jk820"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("./util/udev" "lib/udev/rules.d"
+ #:include-regexp ("rules$")))))
+ (home-page "https://github.com/qmk/qmk_firmware")
+ (synopsis "Udev rules for QMK Firmware")
+ (description
+ "This package provides a set of udev rules to specify the proper
+privileges for flashing QMK compatible devices without needing root. Require
+group @code{plugdev} to be added to each user that needs this.")
+ (license license:gpl2)))
--
2.39.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 0/9] Add qmk-cli
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
` (2 preceding siblings ...)
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
@ 2023-05-28 23:43 ` Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 1/9] gnu: Add python-hjson Fredrik Salomonsson
` (8 more replies)
2023-08-19 0:34 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
4 siblings, 9 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:43 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
Rebased the patches against the latest changes in master. Mostly resolved
conflicts with copyright lines. But did change python-jsonschema-next to
python-jsonschema for qmk-cli.
Fredrik Salomonsson (9):
gnu: Add python-hjson.
gnu: Add python-log-symbols.
gnu: Add python-spinners.
gnu: Add python-halo.
gnu: Add python-milc.
gnu: Add python-dotty-dict.
gnu: Add python-hid.
gnu: Add qmk-cli.
gnu: Add qmk-udev-rules.
gnu/packages/hardware.scm | 71 +++++++++++++
gnu/packages/libusb.scm | 56 +++++++++++
gnu/packages/python-xyz.scm | 193 ++++++++++++++++++++++++++++++++++++
3 files changed, 320 insertions(+)
base-commit: d64d6ea2cf5a1be801be355031fb2cfa5901a92a
--
2.40.1
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 1/9] gnu: Add python-hjson.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
@ 2023-05-28 23:43 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
` (7 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:43 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson, Lars-Dominik Braun, jgart
* gnu/packages/python-xyz.scm (python-hjson): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f7e3f6f538..e6fc35eb6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -137,6 +137,7 @@
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
+;;; Copyright © 2023 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2594,6 +2595,25 @@ (define-public python-humanfriendly
helpers.")
(license license:expat)))
+(define-public python-hjson
+ (package
+ (name "python-hjson")
+ (version "3.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "hjson" version))
+ (sha256
+ (base32
+ "0xfgrnwr6xaqfkaxnzd06sw8zv6dpkbrk0w0kjbag0yg4xd4gbsm"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:tests? #f)) ; no tests
+ (home-page "https://github.com/hjson/hjson-py")
+ (synopsis "Hjson, the Human JSON user interface")
+ (description "This package provides a configuration file format that caters
+to humans and helps reduce the errors they make.")
+ (license license:expat)))
+
(define-public python-textparser
(package
(name "python-textparser")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 2/9] gnu: Add python-log-symbols.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 1/9] gnu: Add python-hjson Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 3/9] gnu: Add python-spinners Fredrik Salomonsson
` (6 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson, Lars-Dominik Braun, jgart
* gnu/packages/python-xyz.scm (python-log-symbols): New variable.
---
gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e6fc35eb6c..f7536b0f20 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16025,6 +16025,37 @@ (define-public python-colorama-for-awscli
(sha256
(base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
+(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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-requirements
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("requirements-dev.txt")
+ (("==") ">=")))))))
+ (native-inputs
+ (list python-tox
+ python-nose
+ python-coverage
+ python-pylint))
+ (propagated-inputs
+ (list python-colorama))
+ (home-page "https://github.com/manrajgrover/py-log-symbols")
+ (synopsis "Colored symbols for various log levels for Python")
+ (description "This package provides a Python module that generates colored symbols
+for info, success, warning and error log level.")
+ (license license:expat)))
(define-public python-moto
(package
(name "python-moto")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 3/9] gnu: Add python-spinners.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 1/9] gnu: Add python-hjson Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 4/9] gnu: Add python-halo Fredrik Salomonsson
` (5 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson, Lars-Dominik Braun, jgart
* gnu/packages/python-xyz.scm (python-spinners): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f7536b0f20..75f93f609a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15996,6 +15996,36 @@ (define-public python-progressbar33
;; Either or both of these licenses may be selected.
(license (list license:lgpl2.1+ license:bsd-3))))
+(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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-requirements
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("requirements-dev.txt")
+ (("==") ">=")))))))
+ (native-inputs
+ (list python-nose
+ python-coverage
+ python-tox
+ python-pylint))
+ (home-page "https://github.com/manrajgrover/py-spinners")
+ (synopsis "Spinners for terminals")
+ (description "This package provides more than 60 spinners for terminals. Is a
+python port of the node library cli-spinners.")
+ (license license:expat)))
+
(define-public python-colorama
(package
(name "python-colorama")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 4/9] gnu: Add python-halo.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
` (2 preceding siblings ...)
2023-05-28 23:44 ` [bug#42682] [PATCH v3 3/9] gnu: Add python-spinners Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 5/9] gnu: Add python-milc Fredrik Salomonsson
` (4 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson, Lars-Dominik Braun, jgart
* gnu/packages/python-xyz.scm (python-halo): New variable.
---
gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 75f93f609a..5df4e30e83 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16086,6 +16086,37 @@ (define-public python-log-symbols
(description "This package provides a Python module that generates colored symbols
for info, success, warning and error log level.")
(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 python-build-system)
+ (native-inputs
+ (list python-tox
+ python-nose
+ python-coverage
+ python-pylint
+ python-twine))
+ (propagated-inputs
+ (list python-colorama
+ python-log-symbols
+ python-six
+ python-spinners
+ python-termcolor))
+ (home-page "https://github.com/manrajgrover/halo")
+ (synopsis "Beautiful terminal spinners in Python")
+ (description "This package provides a Python module that renders various
+fancy looking terminal spinners. The API allow to control color on text
+and/or spinner, what animation if text does not fit etc.")
+ (license license:expat)))
+
(define-public python-moto
(package
(name "python-moto")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 5/9] gnu: Add python-milc.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
` (3 preceding siblings ...)
2023-05-28 23:44 ` [bug#42682] [PATCH v3 4/9] gnu: Add python-halo Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
` (3 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson, Lars-Dominik Braun, jgart
* gnu/packages/python-xyz.scm (python-milc): New variable.
---
gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5df4e30e83..9b71ba1872 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17685,6 +17685,51 @@ (define-public python-magic
the same purpose: to provide Python bindings for libmagic.")
(license license:expat)))
+(define-public python-milc
+ (package
+ (name "python-milc")
+ (version "1.6.6")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "milc" version))
+ (sha256
+ (base32
+ "007hdwp659s1wfld92pxdgjz9ijvh949wyf1cbmyzkma30vng8d4"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ (list
+ python-appdirs
+ python-argcomplete
+ python-colorama
+ python-halo
+ python-spinners))
+ (home-page "https://milc.clueboard.co/")
+ (synopsis "Opinionated Batteries-Included Python 3 CLI Framework")
+ (description "MILC is a framework for writing @acronym{CLI, Command Line Interface}
+applications in Python 3.6+. It gives you all the features users
+expect from a modern CLI tool out of the box:
+@itemize @bullet
+@item
+CLI Argument Parsing, with or without subcommands.
+@item
+Automatic tab-completion support through argcomplete.
+@item
+Configuration file which can be overridden by CLI options.
+@item
+ANSI color support- even on Windows- with colorama.
+@item
+Logging to stderr and/or a file, with ANSI colors.
+@item
+Easy method for printing to stdout with ANSI colors
+@item
+Labeling log output with colored emoji to easily distinguish message types.
+@item
+Thread safety.
+@item
+More than 60 built-in spinners with the ability to add your own.
+@end itemize")
+ (license license:expat)))
+
(define-public s3cmd
(package
(name "s3cmd")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 6/9] gnu: Add python-dotty-dict.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
` (4 preceding siblings ...)
2023-05-28 23:44 ` [bug#42682] [PATCH v3 5/9] gnu: Add python-milc Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 7/9] gnu: Add python-hid Fredrik Salomonsson
` (2 subsequent siblings)
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson, Lars-Dominik Braun, jgart
* gnu/packages/python-xyz.scm (python-dotty-dict): New variable.
---
gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9b71ba1872..947e33176c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28145,6 +28145,42 @@ (define-public python-dictpath
accessor layer.")
(license license:asl2.0)))
+(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 python-build-system)
+ (home-page "https://github.com/pawelzny/dotty_dict")
+ (synopsis "Dictionary wrapper for quick access to deeply nested keys")
+ (description "Has the following features:
+@itemize @bullet
+@item
+Simple wrapper around python dictionary and dict like objects.
+@item
+Two wrappers with the same dict are considered equal.
+@item
+Access to deeply nested keys with dot notation: @code{dot['deeply.nested.key']}.
+@item
+Create, read, update and delete nested keys of any length.
+@item
+Expose all dictionary methods like @code{.get}, @code{.pop}, @code{.keys} and other.
+@item
+Access dicts in lists by index @code{dot['parents.0.first_name']}.
+@item
+key=value caching to speed up lookups and low down memory consumption.
+@item
+Support for setting value in multidimensional lists.
+@item
+Support for accessing lists with slices.
+@end itemize")
+ (license license:expat)))
+
(define-public pyzo
(package
(name "pyzo")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 7/9] gnu: Add python-hid.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
` (5 preceding siblings ...)
2023-05-28 23:44 ` [bug#42682] [PATCH v3 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 8/9] gnu: Add qmk-cli Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/libusb.scm (python-hid): New variable.
---
gnu/packages/libusb.scm | 56 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index d0837c8a91..8e81b0c1a9 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 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages libusb)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages gnupg)
@@ -54,6 +56,7 @@ (define-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
#:use-module (gnu packages tls)
@@ -650,6 +653,59 @@ (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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-library-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("hid/__init__.py")
+ (("'libhidapi-hidraw.so'")
+ (string-append
+ "'" (search-input-file inputs "/lib/libhidapi-hidraw.so") "'"))
+ (("'libhidapi-libusb.so'")
+ (string-append
+ "'" (search-input-file inputs "/lib/libhidapi-libusb.so") "'"))
+ ;; Nuke the rest of the library_paths
+ (("[[:blank:]]+'libhidapi-hidraw.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-libusb.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-iohidmanager.so',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-iohidmanager.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi.dylib',\n")
+ "")
+ (("[[:blank:]]+'hidapi.dll',\n")
+ "")
+ (("[[:blank:]]+'hidapi-0.dll',\n")
+ "")))))))
+ (native-inputs
+ (list
+ python-nose
+ python-tox))
+ (inputs
+ (list
+ hidapi))
+ (home-page "https://github.com/apmorton/pyhidapi")
+ (synopsis "Ctypes bindings for hidapi")
+ (description "This package provides ctypes bindings in Python for the @code{hidapi}
+package. Note that this package conflicts with the
+@code{python-hidapi} package as they occupy the same Python namespace.")
+ (license license:expat)))
+
(define-public python-hidapi
(package
(name "python-hidapi")
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 8/9] gnu: Add qmk-cli.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
` (6 preceding siblings ...)
2023-05-28 23:44 ` [bug#42682] [PATCH v3 7/9] gnu: Add python-hid Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/hardware.scm (qmk-cli): New variable.
---
gnu/packages/hardware.scm | 47 +++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index c23299d1db..ebf5f47e1a 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 Spencer Skylar Chan <schan12@umd.edu>
+;;; Copyright © 2023 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -79,6 +80,8 @@ (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-check)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
@@ -94,10 +97,12 @@ (define-module (gnu packages hardware)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix gexp)
@@ -1438,3 +1443,45 @@ (define-public lxi-tools
on the LXI Consortium standard which defines the communication protocols for
modern instrumentation and data acquision systems using Ethernet.")
(license license:bsd-3)))
+
+(define-public qmk-cli
+ (package
+ (name "qmk-cli")
+ (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)) ; test removed in pypi
+ (inputs
+ (list
+ python-hid
+ python-hjson
+ python-jsonschema
+ python-milc
+ python-pillow
+ python-pygments
+ python-pyserial
+ python-pyusb
+ python-dotty-dict
+ python-tox
+ python-wheel))
+ (home-page "https://qmk.fm")
+ (synopsis "Program to help users work with QMK Firmware")
+ (description
+ "This package provides a @acronym{CLI, command line interface} based
+program to help users work with QMK Firmware. Where QMK Firmware is an open
+firmware for custom keyboards, e.g. Planck, ErgoDox, Corne and many more.
+This @acronym{CLI} program is mainly used for building the QMK firmware, but
+also has some other convenience utilities. To be able to build a firmware
+also include the following packages: @code{avr-toolchain} and either
+@code{dfu-programmer} or @code{avrdude} depending on what microcontroller(s)
+is/are used for the keyboard. To be able to clone the QMK Firmware project
+using @command{qmk clone} include the @code{git} package. It is highly
+recommended to setup udev rules to avoid running this as root when flashing
+the firmware, see @code{qmk-udev-rules} and @code{udev-service-type}.")
+ (license license:expat)))
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 9/9] gnu: Add qmk-udev-rules.
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
` (7 preceding siblings ...)
2023-05-28 23:44 ` [bug#42682] [PATCH v3 8/9] gnu: Add qmk-cli Fredrik Salomonsson
@ 2023-05-28 23:44 ` Fredrik Salomonsson
8 siblings, 0 replies; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-05-28 23:44 UTC (permalink / raw)
To: 42682; +Cc: Fredrik Salomonsson
* gnu/packages/hardware.scm (qmk-udev-rules): New variable.
---
gnu/packages/hardware.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index ebf5f47e1a..e01eb320f2 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1485,3 +1485,27 @@ (define-public qmk-cli
recommended to setup udev rules to avoid running this as root when flashing
the firmware, see @code{qmk-udev-rules} and @code{udev-service-type}.")
(license license:expat)))
+
+(define-public qmk-udev-rules
+ (package
+ (name "qmk-udev-rules")
+ (version "0.20.5") ;; Using qmk_firmware's version
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/qmk/qmk_firmware")
+ (commit version)))
+ (sha256
+ (base32
+ "0v45xvmv351717y2v77fy26ivsnnhsl6ynd7v1pvprpkpf9jk820"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("./util/udev" "lib/udev/rules.d"
+ #:include-regexp ("rules$")))))
+ (home-page "https://github.com/qmk/qmk_firmware")
+ (synopsis "Udev rules for QMK Firmware")
+ (description
+ "This package provides a set of udev rules to specify the proper
+privileges for flashing QMK compatible devices without needing root. Require
+group @code{plugdev} to be added to each user that needs this.")
+ (license license:gpl2)))
--
2.40.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 0/9] Add qmk-cli
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
` (3 preceding siblings ...)
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
@ 2023-08-19 0:34 ` Fredrik Salomonsson
2023-09-02 5:23 ` Vagrant Cascadian
4 siblings, 1 reply; 38+ messages in thread
From: Fredrik Salomonsson @ 2023-08-19 0:34 UTC (permalink / raw)
To: 42682
Hi,
Pinging this to see if there is anyone that can take a look at the
patches. I got it in my personal channel right now and I've flashed
three keyboards with this and it works fine.
E.g.
guix shell avr-toolchain dfu-programmer qmk-cli -- qmk flash -kb kyria -km plattfot -bl dfu-split-left
thanks
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#42682] [PATCH v3 0/9] Add qmk-cli
2023-08-19 0:34 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
@ 2023-09-02 5:23 ` Vagrant Cascadian
2023-10-10 3:56 ` bug#42682: " Maxim Cournoyer
0 siblings, 1 reply; 38+ messages in thread
From: Vagrant Cascadian @ 2023-09-02 5:23 UTC (permalink / raw)
To: Fredrik Salomonsson, 42682
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
retitle 42682 add qmk udev rules
thanks
On 2023-08-19, Fredrik Salomonsson wrote:
> Pinging this to see if there is anyone that can take a look at the
> patches. I got it in my personal channel right now and I've flashed
> three keyboards with this and it works fine.
Most of the packages are now included from another patch series:
74d72046bdc1ed6c859565570d0db58d20c9ddd7 gnu: Add qmk.
7c2fa3e8479401b020001dc26edb5c748877d1ca gnu: Add python-milc.
a8f881d9b354ed46058477ae807cc601060bed1e gnu: Add python-dotty-dict.
b3cee1c7e86601bae6dbd3beed566ecefa25f626 gnu: Add python-hjson.
a012881e158cca32d9e167e8364796b84ff349b0 gnu: Add python-halo.
3080d0d8d714dd066970bd0a4b684150dcdbe67b gnu: Add python-log-symbols.
d98bc6094120fa26d0de6af5cc16bc7644076f7c gnu: Add python-spinners.
2da454d2033d95f108c26ac0018cf73b18823d43 gnu: Add python-hid.
The main outstanding one at a quick glance seems to be the udev
rules, if that is still needed... I have retitled the bug accordingly.
live well,
vagrant
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 38+ messages in thread
* bug#42682: [PATCH v3 0/9] Add qmk-cli
2023-09-02 5:23 ` Vagrant Cascadian
@ 2023-10-10 3:56 ` Maxim Cournoyer
0 siblings, 0 replies; 38+ messages in thread
From: Maxim Cournoyer @ 2023-10-10 3:56 UTC (permalink / raw)
To: Vagrant Cascadian; +Cc: Fredrik Salomonsson, 42682-done
Hello,
Vagrant Cascadian <vagrant@debian.org> writes:
> retitle 42682 add qmk udev rules
> thanks
>
> On 2023-08-19, Fredrik Salomonsson wrote:
>> Pinging this to see if there is anyone that can take a look at the
>> patches. I got it in my personal channel right now and I've flashed
>> three keyboards with this and it works fine.
>
> Most of the packages are now included from another patch series:
>
>
> 74d72046bdc1ed6c859565570d0db58d20c9ddd7 gnu: Add qmk.
> 7c2fa3e8479401b020001dc26edb5c748877d1ca gnu: Add python-milc.
> a8f881d9b354ed46058477ae807cc601060bed1e gnu: Add python-dotty-dict.
> b3cee1c7e86601bae6dbd3beed566ecefa25f626 gnu: Add python-hjson.
> a012881e158cca32d9e167e8364796b84ff349b0 gnu: Add python-halo.
> 3080d0d8d714dd066970bd0a4b684150dcdbe67b gnu: Add python-log-symbols.
> d98bc6094120fa26d0de6af5cc16bc7644076f7c gnu: Add python-spinners.
> 2da454d2033d95f108c26ac0018cf73b18823d43 gnu: Add python-hid.
>
> The main outstanding one at a quick glance seems to be the udev
> rules, if that is still needed... I have retitled the bug accordingly.
I've salvaged the missing parts, adjusted them and pushed along the
qmk-firmware series I had prepared in bug#66217.
Closing!
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 38+ messages in thread
end of thread, other threads:[~2023-10-10 3:58 UTC | newest]
Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 2/2] gnu: Add qmk-cli Jan Wielkiewicz
2020-08-03 8:26 ` Mathieu Othacehe
2020-08-03 12:43 ` Jan Wielkiewicz
2020-08-05 9:17 ` Mathieu Othacehe
2020-08-05 12:22 ` Jan Wielkiewicz
2020-08-07 8:20 ` Mathieu Othacehe
2020-08-07 15:44 ` Jan Wielkiewicz
2021-02-05 11:39 ` Nicolò Balzarotti
2021-02-24 21:41 ` Jan Wielkiewicz
2021-02-24 22:23 ` Nicolò Balzarotti
2020-08-03 8:21 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Mathieu Othacehe
2020-08-03 12:28 ` Jan Wielkiewicz
2022-12-22 12:29 ` [bug#42682] [PATCH 0/2] Qmk cli Marcel van der Boom
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 1/9] gnu: Add python-hjson Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 3/9] gnu: Add python-spinners Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 4/9] gnu: Add python-halo Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 5/9] gnu: Add python-milc Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 7/9] gnu: Add python-hid Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 8/9] gnu: Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 1/9] gnu: Add python-hjson Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 3/9] gnu: Add python-spinners Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 4/9] gnu: Add python-halo Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 5/9] gnu: Add python-milc Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 7/9] gnu: Add python-hid Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 8/9] gnu: Add qmk-cli Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
2023-08-19 0:34 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-09-02 5:23 ` Vagrant Cascadian
2023-10-10 3:56 ` bug#42682: " Maxim Cournoyer
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.