From patchwork Sat Jun 11 19:16:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 39862 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4915027BBEA; Sat, 11 Jun 2022 20:20:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 04E8227BBE9 for ; Sat, 11 Jun 2022 20:20:33 +0100 (BST) Received: from localhost ([::1]:35994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o06eu-0005tL-7F for patchwork@mira.cbaines.net; Sat, 11 Jun 2022 15:20:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o06ch-0002OL-V1 for guix-patches@gnu.org; Sat, 11 Jun 2022 15:18:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o06ch-0007hU-MU for guix-patches@gnu.org; Sat, 11 Jun 2022 15:18:15 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o06ch-00051g-Io for guix-patches@gnu.org; Sat, 11 Jun 2022 15:18:15 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55903] [PATCH 33/41] gnu: Add go-github-com-niemeyer-pretty. Resent-From: "(unmatched-parenthesis" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jun 2022 19:18:15 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55903 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55903@debbugs.gnu.org Cc: "\(unmatched-parenthesis" Received: via spool by 55903-submit@debbugs.gnu.org id=B55903.165497507219008 (code B ref 55903); Sat, 11 Jun 2022 19:18:15 +0000 Received: (at 55903) by debbugs.gnu.org; 11 Jun 2022 19:17:52 +0000 Received: from localhost ([127.0.0.1]:53999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o06cK-0004wQ-An for submit@debbugs.gnu.org; Sat, 11 Jun 2022 15:17:52 -0400 Received: from knopi.disroot.org ([178.21.23.139]:53832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o06c9-0004tx-NC for 55903@debbugs.gnu.org; Sat, 11 Jun 2022 15:17:42 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 297CE43CAB; Sat, 11 Jun 2022 21:17:41 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A_bDuWPY3gKU; Sat, 11 Jun 2022 21:17:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1654975044; bh=BUHF7lqs6pHPf0VrWVh5kMT1q16052DjS/bIfdezjes=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Q+dphCmdUJGkuQBia3FPCy1BqcHf2GgAczwa5DeHTgz3xm582KUqg4tAtTr/mGr4S Z8VhO4KKQ5bbKVxaKWKRPDtH4gp9eWBGDj09Pfl2LDxQKD1plaCf0Hvxtp4G+j7INz CxX6HKJQuz7aJGVg5K30dyTgj+xxbJfo24n1D5zSJ3Z7bR6ZVmtSNhCxo8EhbM+Lh8 cjKhlSp5qteK3EuFZZywWVUBYcnB+LuF/sJHpssTmvdzOI4+YAOhUEVplOGYgdf9PZ Ub7pKz7e9/VpUbVbY2TTDZBOHbnN2yaIqCfBmM2+IZpPOXZu+re84JdIK13N5C6kqj dXoF3kzzWJCWw== Date: Sat, 11 Jun 2022 20:16:45 +0100 Message-Id: <20220611191653.15471-33-paren@disroot.org> In-Reply-To: <20220611191653.15471-1-paren@disroot.org> References: <20220611191653.15471-1-paren@disroot.org> Mime-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: "\(unmatched-parenthesis" X-ACL-Warn: , "\(unmatched-parenthesis via Guix-patches" X-Patchwork-Original-From: "\(unmatched-parenthesis via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/golang.scm (go-github-com-niemeyer-pretty): New variable. --- gnu/packages/golang.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 00b6945e10..61a7ee8edd 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -56,6 +56,7 @@ (define-module (gnu packages golang) #:use-module (guix utils) #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix build-system gnu) @@ -10566,3 +10567,36 @@ (define-public go-github-com-emersion-go-smtp "Package smtp implements the Simple Mail Transfer Protocol as defined in @url{https://rfc-editor.org/rfc/rfc5321.html,RFC 5321}.") (license license:expat))) + +(define-public go-github-com-niemeyer-pretty + (package + (name "go-github-com-niemeyer-pretty") + (version "0.0.0-20200227124842-a10e7caefd8e") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/niemeyer/pretty") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jmazh4xzaa3v6g46hz60q2z7nmqs9l9cxdzmmscn3kbcs2znq4v")))) + (build-system go-build-system) + (arguments + (list #:import-path "github.com/niemeyer/pretty" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'int-to-string-with-rune + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (substitute* "formatter.go" + (("s \\+= string\\(i\\)") + "s += string(rune(i))")))))))) + (propagated-inputs (list go-github-com-kr-text)) + (home-page "https://github.com/niemeyer/pretty") + (synopsis "Pretty-print Go values") + (description + "Package pretty provides pretty-printing for Go values. This is +useful during debugging, to avoid wrapping long output lines in the +terminal.") + (license license:expat)))