From patchwork Sun Jul 10 01:58:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 40618 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 3526127BBE9; Sun, 10 Jul 2022 03:04:52 +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 52D1A27BBEA for ; Sun, 10 Jul 2022 03:04:48 +0100 (BST) Received: from localhost ([::1]:47248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAMJT-0002dK-EX for patchwork@mira.cbaines.net; Sat, 09 Jul 2022 22:04:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAMEt-0002uG-2A for guix-patches@gnu.org; Sat, 09 Jul 2022 22:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAMEs-0001iv-PS for guix-patches@gnu.org; Sat, 09 Jul 2022 22:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAMEs-0006Hb-Ig for guix-patches@gnu.org; Sat, 09 Jul 2022 22:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56474] [PATCH] gnu: Add goawk. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Jul 2022 02:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56474 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56474@debbugs.gnu.org Cc: "Paul A. Patience" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165741834324055 (code B ref -1); Sun, 10 Jul 2022 02:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jul 2022 01:59:03 +0000 Received: from localhost ([127.0.0.1]:36058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAMDv-0006Fv-Gr for submit@debbugs.gnu.org; Sat, 09 Jul 2022 21:59:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:34698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAMDt-0006FW-Fn for submit@debbugs.gnu.org; Sat, 09 Jul 2022 21:59:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAMDs-0000ar-EB for guix-patches@gnu.org; Sat, 09 Jul 2022 21:59:01 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]:30184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAMDp-0007j7-K6 for guix-patches@gnu.org; Sat, 09 Jul 2022 21:58:59 -0400 Date: Sun, 10 Jul 2022 01:58:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1657418326; x=1657677526; bh=4EIkdy0MnaOEJCPITKHZjcclcRPG0JzjMPjtImUMvKk=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=qwDJj+Xco2uTAQv3PU1WtAngSNNi7tzs0ewkgzr4usJYVCPw8BVYkkIivEFwqOh1s qHYoliX0P3cEVUgCncLLlPasewScrysGreJaU4UHYkS+x7sPoj1i6LQlrEdRQpmdZs ScUm5IaGIvreLHurlxUEm8yvxE0uF0i4Hv80bKOpQUCG2KLugkc7Zx0D+jhSB3+PlG r1uHScrosemxjl8anR2v9aesYW3TNAl+jq+zFE/ZZdnuFF2GJQMOVWrzB/21A7xgy0 QzAcOOhYzPuSqFf/7mv2PvsIGtCgK/YyKH7UDU3tQFib3XWFMBf5QuXk3dv0q2yEM6 8hGBSg6/i0ChQ== From: "Paul A. Patience" Message-ID: <20220710015832.129472-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.136; envelope-from=paul@apatience.com; helo=mail-40136.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gawk.scm (goawk): New variable. --- gnu/packages/gawk.scm | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) -- 2.36.1 diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index 9feaf059fb..9bc96d87e7 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm @@ -33,7 +33,8 @@ (define-module (gnu packages gawk) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system copy) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system go)) (define-public gawk (package @@ -245,3 +246,41 @@ (define-public cppawk-egawk (delete "gawk-mpfr") (prepend egawk-next))) (synopsis "cppawk that calls Enhanced GNU Awk by default"))) + +(define-public goawk + (package + (name "goawk") + (version "1.19.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/benhoyt/goawk") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "12z7nzrqyx0y18bsc95i1vp251jw3ik2xj5g8bc12vybndw5x0j0")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/benhoyt/goawk" + #:install-source? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda _ + (substitute* "src/github.com/benhoyt/goawk/interp/interp.go" + (("/bin/sh") (which "sh"))) + (substitute* "src/github.com/benhoyt/goawk/goawk_test.go" + (("/bin/sh") (which "sh"))))) + (add-after 'fix-paths 'fix-tests + (lambda _ + (substitute* "src/github.com/benhoyt/goawk/goawk_test.go" + ;; Don't write test output; it is compared with expected + ;; results anyway. + (("\"writegoawk\", true") "\"writegoawk\", false"))))))) + (home-page "https://github.com/benhoyt/goawk") + (synopsis "Awk interpreter with CSV support") + (description + "GoAWK is a POSIX-compatible version of Awk that also has a CSV mode for +reading and writing CSV and TSV files.") + (license license:expat)))