[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/14: gnu: Add go-github-com-skip2-go-qrcode.
From: |
guix-commits |
Subject: |
07/14: gnu: Add go-github-com-skip2-go-qrcode. |
Date: |
Mon, 12 Feb 2024 18:38:46 -0500 (EST) |
sharlatan pushed a commit to branch master
in repository guix.
commit ac9044699afa46bbb2c4220a700b03816a107065
Author: Dominic Martinez <dom@dominicm.dev>
AuthorDate: Sun Feb 11 19:28:23 2024 +0100
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
---
gnu/packages/golang-xyz.scm | 21 ++++++++++++
.../go-github-com-skip2-go-qrcode-fix-tests.patch | 37 ++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index dd08f19b92..186c0e87a3 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -322,6 +322,27 @@ library which posts the metrics to the Prometheus client
registry and just
updates the registry.")
(license license:asl2.0)))
+(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 "This package provides a QR code encoder for the Goloang.")
+ (license license:expat)))
+
(define-public go-github-com-songgao-water
(package
(name "go-github-com-songgao-water")
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
+
- 03/14: gnu: Add go-github-com-cyberdelia-go-metrics-graphite., (continued)
- 03/14: gnu: Add go-github-com-cyberdelia-go-metrics-graphite., guix-commits, 2024/02/12
- 01/14: gnu: Add go-github-com-anmitsu-go-shlex., guix-commits, 2024/02/12
- 04/14: gnu: Add go-github-com-miekg-dns., guix-commits, 2024/02/12
- 08/14: gnu: go-github-com-prometheus-client-model: Move to golang-xyz., guix-commits, 2024/02/12
- 05/14: gnu: Add go-github-com-nbrownus-go-metrics-prometheus., guix-commits, 2024/02/12
- 02/14: gnu: Add go-github-com-armon-go-radix., guix-commits, 2024/02/12
- 10/14: gnu: go-github-com-stathat-go: Move to golang-xyz., guix-commits, 2024/02/12
- 11/14: gnu: Add go-dario-cat-mergo., guix-commits, 2024/02/12
- 12/14: gnu: Add nebula., guix-commits, 2024/02/12
- 13/14: gnu: nebula: Update to 1.8.2., guix-commits, 2024/02/12
- 07/14: gnu: Add go-github-com-skip2-go-qrcode.,
guix-commits <=
- 09/14: gnu: go-github-com-rcrowley-go-metrics: Move to golang-xyz., guix-commits, 2024/02/12
- 06/14: gnu: Add go-github-com-songgao-water., guix-commits, 2024/02/12
- 14/14: gnu: nebula: Use G-expressions., guix-commits, 2024/02/12