From patchwork Mon Aug 12 18:38:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tusharhero--- via Guix-patches via X-Patchwork-Id: 30037 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 C1D8927BBEA; Mon, 12 Aug 2024 19:39:45 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham 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 AB41C27BBE2 for ; Mon, 12 Aug 2024 19:39:44 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdZx6-0007bC-6e; Mon, 12 Aug 2024 14:39:32 -0400 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 1sdZx5-0007SY-0L for guix-patches@gnu.org; Mon, 12 Aug 2024 14:39:31 -0400 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 1sdZx4-00084m-Mp for guix-patches@gnu.org; Mon, 12 Aug 2024 14:39:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=YY51WunUB9GbYSyz8kPNdNtEci/MsXGCdNmc7X+QCJ0=; b=ZmgNbvMXFP+myG4SlNtqBIs9878AaPRrlSOB3/61bFCAHtwyb2C9cFl3B33Ry+sLNmolYE6uH/Xv2MqINRXqwgjE1DTHjVZ2wFOuNoh72rLcYqa2SvxobMySybzlZSMWMfb2T0Iiy8urh6rWAVlLzfE0/EH19P/vCw6JZEMNjHp/a2KfIYFAQpaXRby3+ziJQRxSyMJK6T+O7b379FyThc78YfLqfvrJQ7xn58TBz4Djc++oEOFEm2BIOsn5Syat1OQMrbKcuPVNDIb66gHwyi4LtRrUOrES3SLKKpRPWL7WjQogEmQIleuxbjbm7ORArw3JGUpcHQlX8b/jg2tzvw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sdZxa-0007Ju-Ol for guix-patches@gnu.org; Mon, 12 Aug 2024 14:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72595] [PATCH] gnu: Add goawk. Resent-From: ashish.is@lostca.se Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Aug 2024 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72595 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72595@debbugs.gnu.org Cc: Ashish SHUKLA X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172348796728073 (code B ref -1); Mon, 12 Aug 2024 18:40:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Aug 2024 18:39:27 +0000 Received: from localhost ([127.0.0.1]:43825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdZx0-0007Ii-JT for submit@debbugs.gnu.org; Mon, 12 Aug 2024 14:39:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:35410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdZwy-0007IW-57 for submit@debbugs.gnu.org; Mon, 12 Aug 2024 14:39:26 -0400 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 1sdZwO-000602-Rr for guix-patches@gnu.org; Mon, 12 Aug 2024 14:38:49 -0400 Received: from anamika.lostca.se ([65.21.75.227]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdZwM-0007zI-Kw for guix-patches@gnu.org; Mon, 12 Aug 2024 14:38:48 -0400 Received: from localhost.localdomain (poincare.inet6.in [IPv6:2a0a:4cc0:1:12d4::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: abbe) by anamika.lostca.se (Postfix) with ESMTPSA id 306AC217E4; Mon, 12 Aug 2024 18:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lostca.se; s=anamika; t=1723487914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YY51WunUB9GbYSyz8kPNdNtEci/MsXGCdNmc7X+QCJ0=; b=WoSeT5S3nj1HBg2XZ90t6sflivGW7Px+LDyaXxYN6oNSOYbxUZoHLrOW8skP8qKDp/5RIU 961w8wiQxte/DISIZ+IvBlmth9ekZ2cSvsPwx3bWiiBlsv2AyQ0sItAHiLIfQhKpPRWWch X5h2sVk9PhX78oHp+fLVmVA/vs86hK0= Date: Mon, 12 Aug 2024 18:38:00 +0000 Message-ID: <8a996a8f08f6127e8d3aa9e2a24dffb4a69ea94b.1723487880.git.ashish.is@lostca.se> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Received-SPF: pass client-ip=65.21.75.227; envelope-from=ashish.is@lostca.se; helo=anamika.lostca.se 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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: ashish.is@lostca.se X-ACL-Warn: , "ashish.is--- via Guix-patches" X-Patchwork-Original-From: "ashish.is--- via Guix-patches" via From: tusharhero--- via Guix-patches via Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Ashish SHUKLA * gnu/packages/gawk.scm (goawk): New variable. Change-Id: Ib611f1ea55b6a4e115f82e08054ea8d04ec57329 --- gnu/packages/gawk.scm | 47 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) base-commit: 2b7e2f44169c3da710534a614b4a0a313a7d272a diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index 16a4ca5b0a..f407da9d94 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018, 2022 Efraim Flashner ;;; Copyright © 2021, 2022 Marius Bakke ;;; Copyright © 2022 Paul A. Patience +;;; Copyright © 2024 Ashish SHUKLA ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,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 @@ -236,3 +238,46 @@ (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.27.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 "003idgqj1g41y4sja9gzbds95fl3ba0l20wfgh7hp4kiivgls7r8")))) + (build-system go-build-system) + (native-inputs (list gawk bash-minimal)) + (arguments + (list + #:import-path "github.com/benhoyt/goawk" + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'patch-bin-sh + (lambda* (#:key inputs import-path #:allow-other-keys) + (for-each (lambda (f) + (substitute* (string-append "src/" import-path "/" f) + (("/bin/sh") + (string-append (assoc-ref inputs "bash-minimal") "/bin/sh")) + (("TestCommandLine") ;; failing test case + "SkipCommandLine"))) + (list "goawk_test.go" "interp/interp.go")))) + (replace 'check + (lambda* (#:key inputs import-path #:allow-other-keys) + (let ((test-output (string-append "src/" import-path "/testdata/output"))) + (chmod test-output #o755) + (for-each (lambda (f) + (chmod f #o644)) + (find-files test-output)) + (invoke "go" "test" import-path + "-awk" (string-append (assoc-ref inputs "gawk") "/bin/gawk")))))))) + (home-page "https://github.com/benhoyt/goawk") + (synopsis "GoAWK: an AWK interpreter with CSV support") + (description "Package goawk is an implementation of AWK with CSV support.") + (license license:expat)))