diff mbox series

[bug#48630] adds `ack' package and it's perl module dependency File::Next

Message ID 20210527164555.vg2xqiaafkii4x4o@silver
State Accepted
Headers show
Series [bug#48630] adds `ack' package and it's perl module dependency File::Next | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Gabriel Wicki May 27, 2021, 4:45 p.m. UTC
On Thu, May 27, 2021 at 08:45:40AM +0200, Xinglu Chen wrote:
> Apart from the commit message not conforming to the ChangeLog format[1],
> looks good to me.

Sorry for that! I hope i got it right, now :)


From 6bd756812bfc684ca92c4aa9c9d3d573b6bb5717 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Thu, 27 May 2021 18:33:19 +0200
Subject: [PATCH] add package perl-file-next

* gnu/packages/perl.scm (perl-file-next): New variable.
---
 gnu/packages/perl.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Xinglu Chen May 28, 2021, 8:13 p.m. UTC | #1
On Thu, May 27 2021, Gabriel Wicki wrote:

> On Thu, May 27, 2021 at 08:45:40AM +0200, Xinglu Chen wrote:
>> Apart from the commit message not conforming to the ChangeLog format[1],
>> looks good to me.
>
> Sorry for that! I hope i got it right, now :)

I forgot to mention that this applies to the ‘ack’ package as well[1],
sorry for the inconvenience!

Also, I don’t have commit access, so you will have to wait for someone
else to merge the patches.

[1]: https://issues.guix.gnu.org/48630#6
Gabriel Wicki July 6, 2021, 6:52 p.m. UTC | #2
On Fri, May 28, 2021 at 10:13:07PM +0200, Xinglu Chen wrote:
> I forgot to mention that this applies to the ‘ack’ package as well[1],
> sorry for the inconvenience!
Now I'm confused...  Both patches are included in my last email[1].
Or am I missing something?

[1] https://issues.guix.gnu.org/48630#8
diff mbox series

Patch

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index d35508112f..4f36fc3e44 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -4654,6 +4654,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.30.2



From 499cf536648320a628cc7aef2606b8817220f27d Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Thu, 27 May 2021 18:40:56 +0200
Subject: [PATCH] add package ack

* gnu/packages/textutils.scm (ack): New variable.
---
 gnu/packages/textutils.scm | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index ab34373705..1df5050f30 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)
@@ -59,6 +60,7 @@ 
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
@@ -1304,3 +1306,40 @@  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 '(#:tests? #t
+                #:phases (modify-phases
+                          %standard-phases
+                          (add-after 'patch-generated-file-shebangs 'patch-more-shebangs
+                                     (lambda* (#:key inputs #:allow-other-keys)
+                                       (let ((perl (string-append
+                                                    (assoc-ref inputs "perl")
+                                                    "/bin/perl")))
+                                         (substitute* "t/ack-type.t"
+                                                      (("/usr/bin/perl")
+                                                       perl)
+                                                      (("/usr/bin/env perl")
+                                                       perl))))))))
+   (propagated-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)))