aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorDominic Martinez <dom@dominicm.dev>2024-02-11 19:28:23 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-02-12 23:33:23 +0000
commitac9044699afa46bbb2c4220a700b03816a107065 (patch)
tree488edfe4d4e43c04189a2eb4a181c1942bfd6d0e /gnu/packages/patches
parent9a938589d1bcc97cf82577d73c300c986ce59594 (diff)
downloadguix-ac9044699afa46bbb2c4220a700b03816a107065.tar
guix-ac9044699afa46bbb2c4220a700b03816a107065.tar.gz
gnu: Add go-github-com-skip2-go-qrcode.
* gnu/packages/golang-xyz.scm (go-github-com-skip2-go-qrcode): New variable. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Change-Id: I3510982cdbc7b540281c0b0f074c1cb140ce249b
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch37
1 files changed, 37 insertions, 0 deletions
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
+