GNU bug report logs - #48630
[PATCH] adds `ack' package and it's perl module dependency File::Next

Previous Next

Package: guix-patches;

Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>

Date: Mon, 24 May 2021 19:12:01 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48630 in the body.
You can then email your comments to 48630 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Mon, 24 May 2021 19:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel Wicki <gabriel <at> erlikon.ch>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 24 May 2021 19:12:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: guix-patches <at> gnu.org
Subject: [PATCH] adds `ack' package and it's perl module dependency File::Next
Date: Mon, 24 May 2021 21:10:54 +0200
modified:   gnu/packages/perl.scm
 - adds package `perl-file-next' (module File::Next)

modified:   gnu/packages/textutils.scm
 - adds package `ack' with disabled tests
---
 gnu/packages/perl.scm      | 20 ++++++++++++++++++++
 gnu/packages/textutils.scm | 26 ++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index d35508112f..87d541783e 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -4578,6 +4578,26 @@ that arise trying to find them consistently across a wide variety of
 platforms.")
     (license (package-license perl))))
 
+(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 "perl-next-file")
+            (sha256
+             (base32
+              "0zdrxk409qxkbbv4fl4wi285kfzyrpaja9wfl00vrxc078rs4afm"))))
+   (build-system perl-build-system)
+   (synopsis "File::Next is a lightweight, taint-safe file-finding Perl module")
+   (description "A Perl CPAN module for finding files.  It has no non-core
+prerequisites")
+   (home-page "https://metacpan.org/pod/File::Next")
+   (license license:artistic2.0)))
+
 (define-public perl-file-path
   (package
     (name "perl-file-path")
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index ab34373705..7dd7ee80e2 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,28 @@ 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 (format #nil "v~a" version))))
+            (file-name "ack")
+            (sha256
+             (base32 "00131vqjbzcn6w22m0h3j6x9kp59dimfnnqhpmi78vbcj0jws1dv"))))
+   (build-system perl-build-system)
+   (arguments '(#:tests? #f))
+   (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)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Mon, 24 May 2021 21:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Gabriel Wicki <gabriel <at> erlikon.ch>, 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] [PATCH] adds `ack' package and it's perl module
 dependency File::Next
Date: Mon, 24 May 2021 23:01:09 +0200
[Message part 1 (text/plain, inline)]
Gabriel Wicki schreef op ma 24-05-2021 om 21:10 [+0200]:
> [...]
> +(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 (format #nil "v~a" version))))

#f is an elisp compatibility hack in Guile.
Use (format #f "v~a" version) instead, or simpler
(string-append "v" version).

Looking at the patch only and (I didn't test it, didn't do
licensing checks, etc.) I only see one other problem:

> +   (arguments '(#:tests? #f))

Why are the tests disabled? (Are there none, do they need
additional packages not in Guix, ...) Maybe add a line like

> +   ;; There is no test suite.
> +   (arguments '(#:tests? #f))

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Mon, 24 May 2021 21:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Gabriel Wicki <gabriel <at> erlikon.ch>, 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] [PATCH] adds `ack' package and it's perl module
 dependency File::Next
Date: Mon, 24 May 2021 23:26:22 +0200
[Message part 1 (text/plain, inline)]
On Mon, May 24 2021, Gabriel Wicki wrote:

> modified:   gnu/packages/perl.scm
>  - adds package `perl-file-next' (module File::Next)
>
> modified:   gnu/packages/textutils.scm
>  - adds package `ack' with disabled tests

Commit messages should be written in ChangeLog format[1], you can look
at previous commits for examples.

This commit should also be split into two separate commits, one adding
‘perl-file-next’, and the other adding ‘ack’.

> +(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 "perl-next-file")

Use ‘(file-name (git-file-name name version))’.

> +            (sha256
> +             (base32
> +              "0zdrxk409qxkbbv4fl4wi285kfzyrpaja9wfl00vrxc078rs4afm"))))
> +   (build-system perl-build-system)
> +   (synopsis "File::Next is a lightweight, taint-safe file-finding Perl module")

Try to make the synopsis as concise as possible, just “Lightweight,
taint-safe file-finding Perl module” should do.  See the ‘Synopses and
Descriptions’ section of the manual.

> +   (description "A Perl CPAN module for finding files.  It has no non-core
> +prerequisites")

The description should contain one or more complete sentences.

> +(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 (format #nil "v~a" version))))

We usually use ‘(string-append "v" version)’ instead of ‘format’.

> +            (file-name "ack")

Use ‘(file-name (git-file-name name version))’ (same as above).

> +            (sha256
> +             (base32 "00131vqjbzcn6w22m0h3j6x9kp59dimfnnqhpmi78vbcj0jws1dv"))))
> +   (build-system perl-build-system)
> +   (arguments '(#:tests? #f))

What’s the reason for disabling the tests?

> +   (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
                                                                ^^
Please use double spacing, and capitalize.

> +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 '")
                                                   ^^
Unecessary whitespace, and missing period.

Could you send an updated series?

[1]: https://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Tue, 25 May 2021 19:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 48630 <at> debbugs.gnu.org
Subject: Re: bug#48630: Acknowledgement ([PATCH] adds `ack' package and it's
 perl module dependency File::Next)
Date: Tue, 25 May 2021 21:12:59 +0200
thanks for the advice, i'll update and split the patch into a small
series soon!


the tests are deactivated because 3 of 841 fail. they seem to check
some kind of shebang #! paths. see this excerpt from the build log:

#   Failed test 'Util::sets_match( TEST_TYPE with -t perl )'
#   at t/ack-type.t line 43.

	# actual[
	#   't/swamp/0:1:#!/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/bin/perl -w',
...
	# ]
	# expected[
	#   't/swamp/0:1:#!/usr/bin/perl -w',
...
	# ]

these lines are being ignored by the patch-generated-file-shebangs
phase, maybe because the #! aren't at the beginning of the line?

i'm a total novice in Perl, so i'm not sure what exactly is happening
there or why this is even tested.

should i try and add my own version of a patch-shebang after the
patch-generated-file-shebangs phase?




Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Tue, 25 May 2021 21:35:02 GMT) Full text and rfc822 format available.

Message #17 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Gabriel Wicki <gabriel <at> erlikon.ch>, 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] Acknowledgement ([PATCH] adds `ack' package and
 it's perl module dependency File::Next)
Date: Tue, 25 May 2021 23:34:26 +0200
[Message part 1 (text/plain, inline)]
On Tue, May 25 2021, Gabriel Wicki wrote:

> thanks for the advice, i'll update and split the patch into a small
> series soon!

Great! :)

> the tests are deactivated because 3 of 841 fail. they seem to check
> some kind of shebang #! paths. see this excerpt from the build log:
>
> #   Failed test 'Util::sets_match( TEST_TYPE with -t perl )'
> #   at t/ack-type.t line 43.
>
> 	# actual[
> 	#   't/swamp/0:1:#!/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/bin/perl -w',
> ...
> 	# ]
> 	# expected[
> 	#   't/swamp/0:1:#!/usr/bin/perl -w',
> ...
> 	# ]
>
> these lines are being ignored by the patch-generated-file-shebangs
> phase, maybe because the #! aren't at the beginning of the line?
>
> i'm a total novice in Perl, so i'm not sure what exactly is happening
> there or why this is even tested.
>
> should i try and add my own version of a patch-shebang after the
> patch-generated-file-shebangs phase?

Yes, you could add add a phase after the ‘patch-generated-file-shebangs’
phase that replaces #!/usr/bin/perl with #!/gnu/store/...-perl/bin/perl.
Something like this should work (untested):

#+begin_src scheme
(add-after 'patch-generated-file-shebangs 'patch-more-shebangs
  (lambda (#:key inputs #:allow-other-keys)
    (substitute* '("t/ack-type.t" ...)
      (let ((perl (assoc-ref inputs "perl")))
        (("/usr/bin/perl")
         (string-append perl "/bin/perl"))))))
#+end_src         

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Tue, 25 May 2021 22:04:01 GMT) Full text and rfc822 format available.

Message #20 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 48630 <at> debbugs.gnu.org
Subject: [PATCH] adds `ack' package and it's perl module dependency File::Next
Date: Wed, 26 May 2021 00:03:11 +0200
[Message part 1 (text/plain, inline)]
From 65c6ef5af4ac8207b6d8905bdc381fc51075367b Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel <at> erlikon.ch>
Date: Tue, 25 May 2021 23:52:59 +0200
Subject: [PATCH] add package perl-find-next

modified:   gnu/packages/perl.scm
 - add package definition `perl-file-next' for File::Next Perl module
---
 gnu/packages/perl.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

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

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Tue, 25 May 2021 22:14:02 GMT) Full text and rfc822 format available.

Message #23 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 48630 <at> debbugs.gnu.org
Subject: [PATCH] adds `ack' package and it's perl module dependency File::Next
Date: Wed, 26 May 2021 00:13:26 +0200
From 2c708fcb56bdb7549a9de7535a0aaf936a18e8a0 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel <at> erlikon.ch>
Date: Wed, 26 May 2021 00:08:09 +0200
Subject: [PATCH] add package ack to (gnu packages textutils)

modified:   gnu/packages/textutils.scm
 - add package ack
 - add (guix build-system perl) and (gnu packages perl) to imports
---
 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)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Thu, 27 May 2021 06:46:02 GMT) Full text and rfc822 format available.

Message #26 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Gabriel Wicki <gabriel <at> erlikon.ch>, 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] [PATCH] adds `ack' package and it's perl module
 dependency File::Next
Date: Thu, 27 May 2021 08:45:40 +0200
[Message part 1 (text/plain, inline)]
On Wed, May 26 2021, Gabriel Wicki wrote:

> From 2c708fcb56bdb7549a9de7535a0aaf936a18e8a0 Mon Sep 17 00:00:00 2001
> From: Gabriel Wicki <gabriel <at> erlikon.ch>
> Date: Wed, 26 May 2021 00:08:09 +0200
> Subject: [PATCH] add package ack to (gnu packages textutils)
>
> modified:   gnu/packages/textutils.scm
>  - add package ack
>  - add (guix build-system perl) and (gnu packages perl) to imports
> ---
>  gnu/packages/textutils.scm | 39 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)

Apart from the commit message not conforming to the ChangeLog format[1],
looks good to me.

[1]: https://www.gnu.org/prep/standards/html_node/Change-Logs.html

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Thu, 27 May 2021 16:47:01 GMT) Full text and rfc822 format available.

Message #29 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: Xinglu Chen <public <at> yoctocell.xyz>
Cc: 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] [PATCH] adds `ack' package and it's perl module
 dependency File::Next
Date: Thu, 27 May 2021 18:45:55 +0200
[Message part 1 (text/plain, inline)]
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 <at> 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(+)

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 <at> 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)))
-- 
2.30.2

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Fri, 28 May 2021 20:14:01 GMT) Full text and rfc822 format available.

Message #32 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Gabriel Wicki <gabriel <at> erlikon.ch>
Cc: 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] [PATCH] adds `ack' package and it's perl module
 dependency File::Next
Date: Fri, 28 May 2021 22:13:07 +0200
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Tue, 06 Jul 2021 18:54:01 GMT) Full text and rfc822 format available.

Message #35 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: Xinglu Chen <public <at> yoctocell.xyz>
Cc: 48630 <at> debbugs.gnu.org
Subject: Re: [bug#48630] [PATCH] adds `ack' package and it's perl module
 dependency File::Next
Date: Tue, 6 Jul 2021 20:52:19 +0200
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




Information forwarded to guix-patches <at> gnu.org:
bug#48630; Package guix-patches. (Mon, 26 Jul 2021 14:34:01 GMT) Full text and rfc822 format available.

Message #38 received at 48630 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 48630 <at> debbugs.gnu.org
Subject: Re: bug#48630: Acknowledgement ([PATCH] adds `ack' package and it's
 perl module dependency File::Next)
Date: Mon, 26 Jul 2021 16:33:03 +0200
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 <gabriel <at> erlikon.ch>
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 <gabriel <at> erlikon.ch>
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)))
-- 
2.32.0




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Fri, 08 Jul 2022 16:47:02 GMT) Full text and rfc822 format available.

Notification sent to Gabriel Wicki <gabriel <at> erlikon.ch>:
bug acknowledged by developer. (Fri, 08 Jul 2022 16:47:02 GMT) Full text and rfc822 format available.

Message #43 received at 48630-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 48630-done <at> debbugs.gnu.org
Subject: [PATCH] adds `ack' package and it's perl module dependency File::Next
Date: Fri, 08 Jul 2022 18:44:30 +0200
Commit 1051db25267a9bbc0ad38be2f3ec92af40f18e18 adds ack.  I’ve
reformatted your patch a little, but nothing fundamental has been
changed.

Thank you for your patience!  Let’s hope your next patch gets noticed
sooner.  Feel free to ping us on IRC if you think we may have forgotten
about your contributions.

Thanks again!

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 Aug 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.