[PATCH 0/5] Add wally-cli

  • Done
  • quality assurance status badge
Details
2 participants
  • Karl Hallsby
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Karl Hallsby
Severity
normal
K
K
Karl Hallsby wrote on 22 Jul 2023 01:48
(address . guix-patches@gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
cover.1689982943.git.karl@hallsby.com
wally-cli is a tiny command-line program to flash keyboard firmware to ZSA,
Ergodox, and Planck keyboards.

Karl Hallsby (5):
gnu: Add go-github-com-google-gousb
gnu: Add go-github-com-cheggaaa-pb-v1
gnu: Add go-github-com-marcinbor85-gohex
gnu: Add go-github-com-carrlos0-spin
gnu: Add wally-cli

gnu/packages/golang.scm | 134 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 134 insertions(+)


base-commit: eb12f3fd8bee99920118ec802ffbac8f1ab676b9
--
2.40.1
K
K
Karl Hallsby wrote on 22 Jul 2023 01:50
[PATCH 1/5] gnu: Add go-github-com-google-gousb
(address . 64778@debbugs.gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
0ba36e2694f1f6194ac52503e64eae5c182a9980.1689982943.git.karl@hallsby.com
* gnu/packages/golang.scm (go-github-com-google-gousb): New variable. Init at
2.1.0.
---
gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ea6aadbe80..f1a8b098ba 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages golang)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages libusb)
#:use-module (gnu packages mail)
#:use-module (gnu packages mp3)
#:use-module (gnu packages password-utils)
@@ -8186,6 +8187,32 @@ (define-public go-github-com-google-goterm
and from termios translations, readCh, reading passwords, etc.")
(license license:bsd-3))))
+(define-public go-github-com-google-gousb
+ (package
+ (name "go-github-com-google-gousb")
+ (version "2.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/gousb")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1aki6hk009sicrf7gxy5nkjmj4j7lsy0by4kjgd9bwq8ragfyv5x"))))
+ (native-inputs (list pkg-config libusb))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/google/gousb"
+ #:phases (modify-phases %standard-phases
+ ;; Delete the check phase because libusbContext and
+ ;; libusbDevHandle cannot be allocated in Go.
+ (delete 'check))))
+ (home-page "https://github.com/google/gousb")
+ (synopsis "Go-like bindings around the libusb library")
+ (description "Go-like bindings around the libusb library")
+ (license license:asl2.0)))
+
(define-public go-github-com-google-go-querystring
(let ((commit "992e8021cf787c100d55520d5c906e01536c0a19") ;fix format in tests
(revision "1"))
--
2.40.1
K
K
Karl Hallsby wrote on 22 Jul 2023 01:50
[PATCH 2/5] gnu: Add go-github-com-cheggaaa-pb-v1
(address . 64778@debbugs.gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
418fa36a8ea4957925b075946268ff6041ac8e58.1689982943.git.karl@hallsby.com
* gnu/packages/golang.scm (go-github-com-cheggaaa-pb-v1): New
variable. Inherit from pb-v3. Init at 1.0.28.
---
gnu/packages/golang.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f1a8b098ba..e2ce6bc890 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -10549,6 +10549,26 @@ (define-public go-github-com-cheggaaa-pb-v3
the terminal.")
(license license:bsd-3)))
+(define-public go-github-com-cheggaaa-pb-v1
+ (package
+ (inherit go-github-com-cheggaaa-pb-v3)
+ (name "go-github-com-cheggaaa-pb-v1")
+ (version "1.0.28")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cheggaaa/pb")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "13a66cqbpdif804qj12z9ad8r24va9q41gfk71qbc4zg1wsxs3rh"))))
+ (arguments
+ '(#:import-path "github.com/cheggaaa/pb/v1"
+ ;; XXX: it does have tests but I'm not sure how to run them.
+ ;; go-build-system is looking in the wrong directory.
+ #:tests? #f))))
+
(define-public go-github-com-cheggaaa-pb
(deprecated-package "go-github-com-cheggaaa-pb" go-github-com-cheggaaa-pb-v3))
--
2.40.1
K
K
Karl Hallsby wrote on 22 Jul 2023 01:50
[PATCH 3/5] gnu: Add go-github-com-marcinbor85-gohex
(address . 64778@debbugs.gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
78b4f29776ff534140430460865884dc61c3efa2.1689982943.git.karl@hallsby.com
* gnu/packages/golang.scm (go-github-com-marcinbor85-gohex): New
variable. Init on commit 55fb1c62 (master at the time).
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e2ce6bc890..90f80c7e27 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -12184,6 +12184,28 @@ (define-public aws-vault
(home-page "https://github.com/99designs/aws-vault")
(license license:expat)))
+(define-public go-github-com-marcinbor85-gohex
+ (let ((commit "55fb1c624d845f0f5b79ee946cf09a15cb50ed89")
+ (revision "0"))
+ (package
+ (name "go-github-com-marcinbor85-gohex")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/marcinbor85/gohex")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0klzqnvmkx6xvy9kc7hbsgpsdcrswnljsq8frf0jxddxi27qh1hn"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "github.com/marcinbor85/gohex"))
+ (home-page "https://github.com/marcinbor85/gohex")
+ (synopsis "A Go library for parsing Intel HEX files")
+ (description "A Go library for parsing Intel HEX files")
+ (license license:expat))))
+
(define-public go-github-com-gsterjov-go-libsecret
(let ((commit "a6f4afe4910cad8688db3e0e9b9ac92ad22d54e1")
(revision "0"))
--
2.40.1
K
K
Karl Hallsby wrote on 22 Jul 2023 01:50
[PATCH 4/5] gnu: Add go-github-com-carrlos0-spin
(address . 64778@debbugs.gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
14ca660b93681024fe41fbcabf2569b4abdc119c.1689982943.git.karl@hallsby.com
* gnu/packages/golang.scm (go-github-com-caarlos0-spin): New
variable. Init at 1.1.0.
---
gnu/packages/golang.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 90f80c7e27..495e32dd18 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -12636,6 +12636,26 @@ (define-public go-github-com-schollz-progressbar-v3
is undetermined, a customizable spinner is shown.")
(license license:expat)))
+(define-public go-github-com-carrlos0-spin
+ (package
+ (name "go-github-com-carrlos0-spin")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/caarlos0-graveyard/spin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pnijds4145j8nsxvq8203r2sg2pbk7x8prkdg2ilghhrzqj6vyc"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "github.com/caarlos0/spin"))
+ (home-page "https://github.com/caarlos0-graveyard/spin")
+ (synopsis "A very simple spinner for cli golang apps")
+ (description "A very simple spinner for cli golang apps")
+ (license license:expat)))
+
(define-public go-git-sr-ht-emersion-go-scfg
(package
(name "go-git-sr-ht-emersion-go-scfg")
--
2.40.1
K
K
Karl Hallsby wrote on 22 Jul 2023 01:50
[PATCH 5/5] gnu: Add wally-cli
(address . 64778@debbugs.gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
41425a05d3dd3ea2e521ffe84037501a9bd1ad79.1689982943.git.karl@hallsby.com
* gnu/packages/golang.scm (wally-cli): New variable. Init at 2.0.1.
---
gnu/packages/golang.scm | 45 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 495e32dd18..ef6ad0b561 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -12206,6 +12206,51 @@ (define-public go-github-com-marcinbor85-gohex
(description "A Go library for parsing Intel HEX files")
(license license:expat))))
+(define-public wally-cli
+ (package
+ (name "wally-cli")
+ (version "2.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zsa/wally-cli")
+ (commit (string-append version "-linux"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1iswh1z7llapjn116lyr5lvry7q93zfaasxvm36q5jx09hf91v1n"))))
+ (native-inputs
+ (list pkg-config
+ go-github-com-carrlos0-spin
+ go-github-com-google-gousb
+ go-github-com-marcinbor85-gohex
+ go-github-com-mattn-go-runewidth
+ go-golang-org-x-sys
+ go-github-com-cheggaaa-pb-v1))
+ (inputs (list libusb))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/zsa/wally-cli"
+ ;; We don't need to install the source code for end-user applications.
+ #:install-source? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-cheggaaa-pb-go-mod-require
+ ;; Some files that use this package use a strange package path that
+ ;; go-build-system does not like. So, we replace the imported
+ ;; package's old name with this new one, which does work.
+ (lambda* (#:key import-path #:allow-other-keys)
+ (substitute* (list (string-append "src/" import-path "/go.mod")
+ (string-append "src/" import-path "/main.go"))
+ (("gopkg.in/cheggaaa/pb.v1")
+ "github.com/cheggaaa/pb/v1")))))))
+ (home-page "https://ergodox-ez.com/pages/wally-planck")
+ (synopsis "A tool to flash firmware to mechanical keyboards")
+ (description "Provides a command-line interface for the Wally GUI utility for
+flashing firmware to mechanical keyboards. Particularly for Ergodox, ZSA Moonlander,
+and Planck keyboards.")
+ (license license:expat)))
+
(define-public go-github-com-gsterjov-go-libsecret
(let ((commit "a6f4afe4910cad8688db3e0e9b9ac92ad22d54e1")
(revision "0"))
--
2.40.1
K
K
Karl Hallsby wrote on 22 Jul 2023 02:06
[PATCH 1/5] gnu: Add go-github-com-google-gousb
(address . 64778@debbugs.gnu.org)(name . Karl Hallsby)(address . karl@hallsby.com)
3d26fb2b18292946ef7d039643a3dd0de036c777.1689984374.git.karl@hallsby.com
* gnu/packages/golang.scm (go-github-com-google-gousb): New variable. Init at
2.1.0.
---
gnu/packages/golang.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ea6aadbe80..8f02d77873 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2022 Christopher Howard <christopher@librehacker.com>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
+;;; Copyright © 2023 Raven Hallsby <karl@hallsby.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -78,6 +79,7 @@ (define-module (gnu packages golang)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages libusb)
#:use-module (gnu packages mail)
#:use-module (gnu packages mp3)
#:use-module (gnu packages password-utils)
@@ -8186,6 +8188,32 @@ (define-public go-github-com-google-goterm
and from termios translations, readCh, reading passwords, etc.")
(license license:bsd-3))))
+(define-public go-github-com-google-gousb
+ (package
+ (name "go-github-com-google-gousb")
+ (version "2.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/gousb")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1aki6hk009sicrf7gxy5nkjmj4j7lsy0by4kjgd9bwq8ragfyv5x"))))
+ (native-inputs (list pkg-config libusb))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/google/gousb"
+ #:phases (modify-phases %standard-phases
+ ;; Delete the check phase because libusbContext and
+ ;; libusbDevHandle cannot be allocated in Go.
+ (delete 'check))))
+ (home-page "https://github.com/google/gousb")
+ (synopsis "Go-like bindings around the libusb library")
+ (description "Go-like bindings around the libusb library")
+ (license license:asl2.0)))
+
(define-public go-github-com-google-go-querystring
(let ((commit "992e8021cf787c100d55520d5c906e01536c0a19") ;fix format in tests
(revision "1"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 29 Mar 15:26 +0100
[PATCH 0/5] Add wally-cli
(address . 64778-done@debbugs.gnu.org)
87frw9dshc.fsf@gmail.com
Closing as duplicate.

wally-cli was added from https://issues.guix.gnu.org/47769.

Thanks,
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmYGz48ACgkQdtcnv/Ys
0rXLGQ/5AWJZ920rvFf0ur5L2rBi72iRTm/wwfwYWG9RbXkp8Ku1w4ml1NcyZz84
sBkzyiqb+3P6HqlIgSY3v4W0FkwW9YjS/rohOAPLFEVfMf2W0cHlkco5rU1dupwX
zU6nkE6PVd3YIuSR5mi70SG8cm8RxSIXphq8WQ7qcGzk1JUNS5BSEKoXOoxO4jJw
vQFTq1NPR0i2j+TWfJlkEOg/io6nqm+idwwF3oVbi7fsD6QFwiqIn6WWXsgO+Iqo
ni+Fgj1bv+fMTEpOvJeTXRJV3mPDt5xb28lyTsiGDnepgfhCqewitPzIqsRyvQji
pMdr9+mIWWoX4vvDivEWifWwBnPQtQxeVho0ZJk6vWjDYfR9X6UcWHAP/pq5m0al
+WZUkquMXhJkjG05g3+MmIFZpHnUExnEWHxPkrh3uqa5hFph5cYWluNUmFiIoKwM
a1usAj54VJEH1mLVwztzLNbmnA8PYZWg4nJcvgoE8hQGnK+3TRhu6brYD9fvS1w1
mfMkkDbrd2Z6YSCnb8mZKwkiUZaM61D6fFRbYX2y3rLVrCtL6AeVqmFI0iMfJbUF
3J6AkjIW7qMR1GvrWWcUzRbh4P3k/K0Mskqgv4oxXGlbEvG7GxvKyNXNwbW451HG
ppzQhL3z/fgc9DiC5lE24GyERpoYRvQdet1I9ej67UpJ71xH5N8=
=9Jjm
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64778@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64778
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch