From patchwork Mon Jul 26 14:33:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Wicki X-Patchwork-Id: 31610 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 8467B27BC78; Mon, 26 Jul 2021 15:34:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1843327BC6B for ; Mon, 26 Jul 2021 15:34:11 +0100 (BST) Received: from localhost ([::1]:49288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m81gI-00026R-5H for patchwork@mira.cbaines.net; Mon, 26 Jul 2021 10:34:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m81gA-00021J-DK for guix-patches@gnu.org; Mon, 26 Jul 2021 10:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m81gA-000707-4Q for guix-patches@gnu.org; Mon, 26 Jul 2021 10:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m81g9-00050m-NY for guix-patches@gnu.org; Mon, 26 Jul 2021 10:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48630] Acknowledgement ([PATCH] adds `ack' package and it's perl module dependency File::Next) Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 26 Jul 2021 14:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48630 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48630@debbugs.gnu.org Received: via spool by 48630-submit@debbugs.gnu.org id=B48630.162731001519231 (code B ref 48630); Mon, 26 Jul 2021 14:34:01 +0000 Received: (at 48630) by debbugs.gnu.org; 26 Jul 2021 14:33:35 +0000 Received: from localhost ([127.0.0.1]:51295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m81fd-0004zz-Ga for submit@debbugs.gnu.org; Mon, 26 Jul 2021 10:33:35 -0400 Received: from chimborazo.ee.ethz.ch ([129.132.2.15]:54831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m81fZ-0004zh-7C for 48630@debbugs.gnu.org; Mon, 26 Jul 2021 10:33:28 -0400 Received: from silvi (212-51-128-14.fiber7.init7.net [212.51.128.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gabriel) by chimborazo.ee.ethz.ch (Postfix) with ESMTPSA id 0A3B3400EA for <48630@debbugs.gnu.org>; Mon, 26 Jul 2021 16:33:15 +0200 (CEST) Date: Mon, 26 Jul 2021 16:33:03 +0200 From: Gabriel Wicki Message-ID: <20210726143303.xljnaiuh3mghzyx3@silvi> References: <20210524191054.7wtb4wopstgx2c77@silver> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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" X-getmail-retrieved-from-mailbox: Patches Please disregard my previous messages. The previously posted version of ack only worked when perl-file-next was part of the user's profile. The new patches address that issue (though I only changed the commit title of the first patch). I hope I finally got it all right :) Thanks to all for pointers and patience! From 974467a42085e342202339038c644c8579e890d1 Mon Sep 17 00:00:00 2001 From: Gabriel Wicki Date: Mon, 26 Jul 2021 15:43:36 +0200 Subject: [PATCH] gnu: Add perl-file-next. * gnu/packages/perl.scm (perl-file-next): New variable. --- gnu/packages/perl.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index db10c44a20..545ef61d76 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -4789,6 +4789,25 @@ provided base directory and can return files (and/or directories if desired) matching a regular expression.") (home-page "https://metacpan.org/release/File-List"))) +(define-public perl-file-next + (package + (name "perl-file-next") + (version "1.18") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/petdance/file-next") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zdrxk409qxkbbv4fl4wi285kfzyrpaja9wfl00vrxc078rs4afm")))) + (build-system perl-build-system) + (synopsis "Lightweight, taint-safe file-finding Perl module") + (description "File::Next is a Perl CPAN module for finding files.") + (home-page "https://metacpan.org/pod/File::Next") + (license license:artistic2.0))) + (define-public perl-file-readbackwards (package (name "perl-file-readbackwards") -- 2.32.0 From 8150ec6199e91f53ac36c5c1d217e2f216101324 Mon Sep 17 00:00:00 2001 From: Gabriel Wicki Date: Mon, 26 Jul 2021 16:02:32 +0200 Subject: [PATCH] gnu: Add ack. * gnu/packages/textutils.scm (ack): New variable. --- gnu/packages/textutils.scm | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index c3f4580a47..dcec1088b1 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -45,6 +45,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system cmake) + #:use-module (guix build-system perl) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages) @@ -1304,3 +1305,56 @@ languages such as HTML, Markdown, Asciidoc, and reStructuredText. The community around it also has a list of style guides implemented with Vale in @url{https://github.com/errata-ai/styles, their styles repo}.") (license license:expat))) + +(define-public ack + (package + (name "ack") + (version "3.5.0") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/beyondgrep/ack3") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00131vqjbzcn6w22m0h3j6x9kp59dimfnnqhpmi78vbcj0jws1dv")))) + (build-system perl-build-system) + (arguments `(#:phases (modify-phases + %standard-phases + (add-after + 'patch-generated-file-shebangs 'patch-more-shebangs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((perl (string-append + (assoc-ref inputs "perl") + "/bin/perl")) + (append-inc-string + (lambda (i) + (string-append + i "/lib/perl5/site_perl/" + ,(package-version perl))))) + (substitute* + "t/ack-type.t" + (("/usr/bin/perl") + perl) + (("/usr/bin/env perl") + perl)) + (substitute* + "ack" + (("/bin/perl") ;; add @INC include paths to perl calls + (string-append + "/bin/perl -I " + (append-inc-string + (assoc-ref inputs "perl-file-next")) + " -I " + (append-inc-string + (assoc-ref outputs "out"))))))))))) + (inputs `(("perl-file-next" ,perl-file-next))) + (synopsis "Code-searching tool optimized for programmers with large trees +of source code") + (description "ack is a tool for finding text inside files. It is designed for +hackers and programmers by being fast, ignoring VCS directories, letting a user +easily specify file types, match highlighting, Perl-Compatible Regular +Expressions, and being faster to type than grep.") + (home-page "https://beyondgrep.com/") + (license license:artistic2.0)))