From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eFOFIk0SyWUvNgEA62LTzQ:P1 (envelope-from ) for ; Sun, 11 Feb 2024 19:30:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id eFOFIk0SyWUvNgEA62LTzQ (envelope-from ) for ; Sun, 11 Feb 2024 19:30:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b=ib8cfwzn; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707676237; a=rsa-sha256; cv=none; b=YJIjU8w6ezwLIuQK2sZchwN54rV3fti9StwKsCYlixJdw8YZDkBJEZ67yX8PFXuyNcrPSh tZGm2H6L4Ns8PtptpmYxYZ4eg7bWYW4IAeOPgT/4oYrqvAyHnXOxd1ZS+xdP4cD2Jq3Ts6 tASfJJ5xmiLuWvB9CeaIhftsrZk7I/hkN2LghgI4319NLC4vrjkVEKwl+g3wXOiOP8qdC7 CC2P/I9PCweOuQZjgAf5lyIM7Ao8V6upgQr53FP15b56Ki4RvK3ehIFZcG95dvsKXBOQWr cVxEbc3rqAOfvZe8MBeUxH6Gz9kuU36gdeZrqhXIp8a2ntIja+lSW0OoxOQnYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b=ib8cfwzn; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707676237; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=R8QpujRqaMWEr6K9LvCgdCwdxXvKQ9fb25GMir4A6g0=; b=qBYU5JXHiruh01OuSYvURs/C4rSRuZDXr2LbiQcAUg6Qk/wEKI9vUgG1QSm3u4iSft/Z5k 3lQKW4/AHxfeqp/tPyGy1Nvzck+B9ksHiS9BBJkN6BKyjdA+WUCIZ0EELFW/zgf16fifLq 2d2o/PqIkrt5CztLR8DD5ck5AIK7d786rf1xkm17FPEGdCEjff+wiHRkYl4zGRJBUAtUUW Eyour69c4De6bEdi075mYgAMEL6HDmaGkmuD2grmY1A2BJjO2gcwWSJ8eEkDlRFqxMt3Ib xfHefdqkbLc1lbjE7c19joQoCZTSUW3zrcc8jMwKH8KTq8SPFvrddx5BBhgEyw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5C41C781F2 for ; Sun, 11 Feb 2024 19:30:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZEaO-0005qX-GU; Sun, 11 Feb 2024 13:29:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZEaK-0005pJ-QO for guix-patches@gnu.org; Sun, 11 Feb 2024 13:29:50 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZEaK-0008F6-H3 for guix-patches@gnu.org; Sun, 11 Feb 2024 13:29:48 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZEaa-0003Xx-Ph; Sun, 11 Feb 2024 13:30:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54335] [PATCH v4 09/12] gnu: Add go-github-com-skip2-go-qrcode. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: cox.katherine.e+guix@gmail.com, sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Sun, 11 Feb 2024 18:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54335 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54335@debbugs.gnu.org Cc: Katherine Cox-Buday , Sharlatan Hellseher X-Debbugs-Original-Xcc: Katherine Cox-Buday , Sharlatan Hellseher Received: via spool by 54335-submit@debbugs.gnu.org id=B54335.170767615413429 (code B ref 54335); Sun, 11 Feb 2024 18:30:04 +0000 Received: (at 54335) by debbugs.gnu.org; 11 Feb 2024 18:29:14 +0000 Received: from localhost ([127.0.0.1]:37994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZEZm-0003UR-0J for submit@debbugs.gnu.org; Sun, 11 Feb 2024 13:29:14 -0500 Received: from mail.mmer.org ([178.22.65.174]:48250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZEZc-0003S0-GH for 54335@debbugs.gnu.org; Sun, 11 Feb 2024 13:29:05 -0500 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id f48b9d40 for <54335@debbugs.gnu.org>; Sun, 11 Feb 2024 18:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=ZvNmeA5lTggO8Qyl/03pCw3oN ZM1qGpXWDWKROf2ZxQ=; b=ib8cfwznknOw/82oeUFB8UUfAcMx1XOT9GoIynUc4 cRoaQKZ5jj6zm4uEwSKCs6oZli44zTJCb7S1dks2If2ch9Y/ZuAUym7Q0E7WWuvb m1kbdC0gDZjaez/WOekMI43umuLAOgSWe74ramietIa/1980/UyfRgEmFLANeQK/ pw= Received: from delta (i60212.upc-i.chello.nl [62.195.60.212]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id b4afdcae (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <54335@debbugs.gnu.org>; Sun, 11 Feb 2024 18:28:37 +0000 (UTC) Date: Sun, 11 Feb 2024 19:28:23 +0100 Message-ID: <20240211182830.3631-10-levenson@mmer.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240211182830.3631-1-levenson@mmer.org> References: <20240211182830.3631-1-levenson@mmer.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Alexey Abramov X-ACL-Warn: , Alexey Abramov via Guix-patches From: Alexey Abramov via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Spam-Score: -6.68 X-Migadu-Queue-Id: 5C41C781F2 X-Migadu-Spam-Score: -6.68 X-TUID: m+tWQrFzZllv From: Dominic Martinez * gnu/packages/golang.scm (go-github-com-skip2-go-qrcode): New variable. --- gnu/packages/golang.scm | 23 ++++++++++++ ...github-com-skip2-go-qrcode-fix-tests.patch | 37 +++++++++++++++++++ 2 files changed, 60 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 2f419fe35d..4196ffe2c9 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -11887,6 +11887,29 @@ (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))) + ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances ;;; of a merge conflict, place them above by existing packages with similar 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 +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.41.0