all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dominic Martinez <dom@dominicm.dev>
To: 54335@debbugs.gnu.org
Cc: Dominic Martinez <dom@dominicm.dev>
Subject: [bug#54335] [PATCH v3 09/10] gnu: Add go-github-com-skip2-go-qrcode.
Date: Mon,  4 Apr 2022 15:32:07 -0400	[thread overview]
Message-ID: <20220404193208.27634-10-dom@dominicm.dev> (raw)
In-Reply-To: <20220404193208.27634-1-dom@dominicm.dev>

* gnu/packages/golang.scm (go-github-com-skip2-go-qrcode): New variable.
---

The go-qrcode decoding test doesn't compile due to a change in Go's int to
string conversion. There is an active pull request with the fix at
https://github.com/skip2/go-qrcode/pull/53, but in the meantime I included a
patch for the test.

 gnu/packages/golang.scm                       | 22 +++++++++++
 ...github-com-skip2-go-qrcode-fix-tests.patch | 37 +++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index db1ea44d8c..0eae371f40 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9997,3 +9997,25 @@ (define-public go-google-golang-org-protobuf
 language specific bindings.")
     (home-page "https://go.googlesource.com/protobuf")
     (license license:bsd-3)))
+
+(define-public go-github-com-skip2-go-qrcode
+  (package
+    (name "go-github-com-skip2-go-qrcode")
+    (version "0.0.0-20200617195104-da1b6568686e")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/skip2/go-qrcode")
+             (commit (go-version->git-ref version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0pghd6y2x8a5fqy4rjn4d8j5jcslb236naycdza5an7vyvinsgs9"))
+       (patches (search-patches "go-github-com-skip2-go-qrcode-fix-tests.patch"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/skip2/go-qrcode"))
+    (home-page "https://github.com/skip2/go-qrcode")
+    (synopsis "QR code encoder")
+    (description "@code{go-github-com-skip2-go-qrcode} provides a QR code
+encoder for the Go language.")
+    (license license:expat)))
diff --git a/gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch b/gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch
new file mode 100644
index 0000000000..631cb0cdab
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch
@@ -0,0 +1,37 @@
+From dd203f29a36bf518deacbc03e8562b0195c8345f Mon Sep 17 00:00:00 2001
+From: Dominic Martinez <dom@dominicm.dev>
+Date: Mon, 4 Apr 2022 12:06:03 -0400
+Subject: [PATCH] Fix failing qr decode test
+
+First convert integers into runes before performing a string conversion.
+---
+ qrcode_decode_test.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/qrcode_decode_test.go b/qrcode_decode_test.go
+index 1f4b1d3..2b0756b 100644
+--- a/qrcode_decode_test.go
++++ b/qrcode_decode_test.go
+@@ -122,7 +122,7 @@ func TestDecodeAllCharacters(t *testing.T) {
+ 
+ 	// zbarimg has trouble with null bytes, hence start from ASCII 1.
+ 	for i := 1; i < 256; i++ {
+-		content += string(i)
++		content += string(rune(i))
+ 	}
+ 
+ 	q, err := New(content, Low)
+@@ -154,7 +154,7 @@ func TestDecodeFuzz(t *testing.T) {
+ 		for j := 0; j < len; j++ {
+ 			// zbarimg seems to have trouble with special characters, test printable
+ 			// characters only for now.
+-			content += string(32 + r.Intn(94))
++			content += string(rune(32 + r.Intn(94)))
+ 		}
+ 
+ 		for _, level := range []RecoveryLevel{Low, Medium, High, Highest} {
+
+base-commit: da1b6568686e89143e94f980a98bc2dbd5537f13
+-- 
+2.34.0
+
-- 
2.34.0





  parent reply	other threads:[~2022-04-04 19:34 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11  3:13 [bug#54335] [PATCH 00/14] gnu: Add nebula Dominic Martinez
2022-03-11  3:18 ` [bug#54335] [PATCH 01/14] gnu: Add go-github-com-anmitsu-go-shlex Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 02/14] gnu: Add go-github-com-armon-go-radix Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 03/14] gnu: Add go-github-com-cespare-xxhash-v2 Dominic Martinez
2022-03-11 16:20     ` Maxime Devos
2022-03-11  3:18   ` [bug#54335] [PATCH 04/14] gnu: Add go-github-com-cyberdelia-go-metrics-graphite Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 05/14] gnu: Add go-github-com-google-gopacket Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 06/14] gnu: Add go-github-com-miekg-dns Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 07/14] gnu: Add go-github-com-nbrownus-go-metrics-prometheus Dominic Martinez
2022-03-11  7:46     ` Maxime Devos
2022-03-11 20:24       ` Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 08/14] gnu: Add go-github-com-songgao-water Dominic Martinez
2022-03-11  3:18   ` [bug#54335] [PATCH 09/14] gnu: Add go-github-com-vishvananda-netns Dominic Martinez
2022-03-11  7:47     ` Maxime Devos
2022-03-11 16:06     ` Maxime Devos
2022-03-11 20:26       ` Dominic Martinez
2022-03-11  3:47   ` [bug#54335] [PATCH 10/14] gnu: Add go-github-com-vishvananda-netlink Dominic Martinez
2022-03-11  3:47     ` [bug#54335] [PATCH 11/14] gnu: Add go-google-golang-org-protobuf Dominic Martinez
2022-03-11 13:46       ` Maxime Devos
2022-03-11 20:41         ` Dominic Martinez
2022-03-11 16:14       ` Maxime Devos
2022-03-11 20:38         ` Dominic Martinez
2022-03-11 16:16       ` Maxime Devos
2022-03-11 20:32         ` Dominic Martinez
2022-03-12 22:45           ` Maxime Devos
2022-03-11 16:17       ` Maxime Devos
2022-03-11  3:47     ` [bug#54335] [PATCH 12/14] gnu: Add go-github-com-matttproud-golang-protobuf-extensions Dominic Martinez
2022-03-11  3:47     ` [bug#54335] [PATCH 13/14] gnu: Add go-github-com-skip2-go-qrcode Dominic Martinez
2022-03-11  7:49       ` Maxime Devos
2022-03-11 20:46         ` Dominic Martinez
2022-03-11  7:49       ` Maxime Devos
2022-03-11 20:47         ` Dominic Martinez
2022-03-11 20:49         ` Dominic Martinez
2022-03-12 22:10           ` Maxime Devos
2022-03-11  3:47     ` [bug#54335] [PATCH 14/14] gnu: Add nebula Dominic Martinez
2022-03-11  7:51       ` Maxime Devos
2022-03-11 20:53         ` Dominic Martinez
2022-03-12 22:20           ` Maxime Devos
2022-03-11 13:48       ` Maxime Devos
2022-03-11 21:02         ` Dominic Martinez
2022-03-12 22:33           ` Maxime Devos
2022-03-11 21:10         ` Dominic Martinez
2022-03-11 13:59       ` Maxime Devos
2022-03-11 20:59         ` Dominic Martinez
2022-03-11  7:48     ` [bug#54335] [PATCH 10/14] gnu: Add go-github-com-vishvananda-netlink Maxime Devos
2022-03-11 16:05     ` Maxime Devos
2022-03-11  4:51   ` [bug#54335] [PATCH v2 01/14] gnu: Add go-github-com-anmitsu-go-shlex Dominic Martinez
2022-03-19 17:09     ` [bug#54335] [PATCH 00/14] gnu: Add nebula Ludovic Courtès
2022-03-19 17:27       ` Dominic Martinez
2022-03-11 16:09   ` [bug#54335] [PATCH 01/14] gnu: Add go-github-com-anmitsu-go-shlex Maxime Devos
2022-03-11 20:28     ` Dominic Martinez
2022-04-04 19:31 ` [bug#54335] [PATCH v3 00/10] gnu: Add nebula Dominic Martinez
2022-04-04 19:31   ` [bug#54335] [PATCH v3 01/10] gnu: Add go-github-com-anmitsu-go-shlex Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 02/10] gnu: Add go-github-com-armon-go-radix Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 03/10] gnu: Add go-github-com-cyberdelia-go-metrics-graphite Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 04/10] gnu: Add go-github-com-google-gopacket Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 05/10] gnu: Add go-github-com-miekg-dns Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 06/10] gnu: Add go-github-com-nbrownus-go-metrics-prometheus Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 07/10] gnu: Add go-github-com-songgao-water Dominic Martinez
2022-04-04 19:32   ` [bug#54335] [PATCH v3 08/10] gnu: Add go-google-golang-org-protobuf Dominic Martinez
2022-04-04 19:32   ` Dominic Martinez [this message]
2022-04-04 19:32   ` [bug#54335] [PATCH v3 10/10] gnu: Add nebula Dominic Martinez
2022-04-04 22:01     ` Maxime Devos
2022-05-26  1:40   ` [bug#54335] [PATCH v3 00/10] " Dominic Martinez
2022-10-05 18:30 ` [bug#54335] Status check Sharlatan Hellseher
2022-11-03  9:32   ` [bug#54335] [PATCH 00/14] gnu: Add nebula zimoun
2022-11-03 17:55   ` [bug#54335] Status check Dominic Martinez via Guix-patches via
2024-02-11 18:28 ` [bug#54335] [PATCH v4 00/12] gnu: Add nebula Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 01/12] gnu: Add go-github-com-anmitsu-go-shlex Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 02/12] gnu: Add go-github-com-armon-go-radix Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 03/12] gnu: Add go-github-com-cyberdelia-go-metrics-graphite Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 04/12] gnu: Add go-github-com-google-gopacket Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 05/12] gnu: Add go-github-com-miekg-dns Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 06/12] gnu: Add go-github-com-nbrownus-go-metrics-prometheus Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 07/12] gnu: Add go-github-com-songgao-water Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 08/12] gnu: Add go-google-golang-org-protobuf Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 09/12] gnu: Add go-github-com-skip2-go-qrcode Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 10/12] gnu: Add nebula Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 11/12] gnu: Add go-dario-cat-mergo Alexey Abramov via Guix-patches via
2024-02-11 18:28   ` [bug#54335] [PATCH v4 12/12] gnu: nebula: Update to 1.8.2 Alexey Abramov via Guix-patches via
2024-02-12 23:51 ` bug#54335: [PATCH 00/14] gnu: Add nebula Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220404193208.27634-10-dom@dominicm.dev \
    --to=dom@dominicm.dev \
    --cc=54335@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.