[PATCH] New package: ack

  • Done
  • quality assurance status badge
Details
3 participants
  • Jelle Licht
  • Ludovic Courtès
  • Ryan Sundberg
Owner
unassigned
Submitted by
Ryan Sundberg
Severity
normal
R
R
Ryan Sundberg wrote on 7 Jun 2021 01:51
(address . guix-patches@gnu.org)(name . Ryan Sundberg)(address . ryan@arctype.co)
20210606235149.25344-1-ryan@arctype.co
ack is a grep-like source code search tool.

Signed-off-by: Ryan Sundberg <ryan@arctype.co>
---
gnu/packages/search.scm | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index 362eb0d95e..a131678936 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2021 Ryan Sundberg <ryan@arctype.co>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,11 +25,12 @@
(define-module (gnu packages search)
#:use-module ((guix licenses)
- #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license))
+ #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license artistic2.0))
#:use-module (guix packages)
#:use-module (guix download)
#: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 perl)
#:use-module (guix build-system python)
@@ -50,6 +52,32 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml))
+
+(define-public ack
+ (package
+ (name "ack")
+ (version "3.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://beyondgrep.com/ack-v" version))
+ (sha256 (base32 "17wq9c1pwisbg4mcmvmdaym8hlawx209iriaxjlw9hwi0v4x6w38"))))
+ (inputs `(("perl" ,perl)))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("ack" "bin/ack"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (copy-file source "ack")
+ (chmod "ack" #o0755)
+ #t)))))
+ (home-page "https://github.com/protojure/protoc-plugin")
+ (synopsis "ack is a grep-like source code search tool.")
+ (description "Designed for programmers with large heterogeneous trees of source code, ack is written in portable Perl 5 and takes advantage of the power of Perl's regular expressions. ack is designed as an alternative to grep for programmers.")
+ (license artistic2.0)))
+
(define-public xapian
(package
(name "xapian")
--
2.31.1
R
R
Ryan Sundberg wrote on 7 Jun 2021 01:58
(address . guix-patches@gnu.org)(name . Ryan Sundberg)(address . ryan@arctype.co)
20210606235852.26193-1-ryan@arctype.co
ack is a grep-like source code search tool.

(The previous patch had the wrong home-page set.)

Signed-off-by: Ryan Sundberg <ryan@arctype.co>
---
gnu/packages/search.scm | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index 362eb0d95e..e4f48d5906 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2021 Ryan Sundberg <ryan@arctype.co>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,11 +25,12 @@
(define-module (gnu packages search)
#:use-module ((guix licenses)
- #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license))
+ #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license artistic2.0))
#:use-module (guix packages)
#:use-module (guix download)
#: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 perl)
#:use-module (guix build-system python)
@@ -50,6 +52,31 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml))
+(define-public ack
+ (package
+ (name "ack")
+ (version "3.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://beyondgrep.com/ack-v" version))
+ (sha256 (base32 "17wq9c1pwisbg4mcmvmdaym8hlawx209iriaxjlw9hwi0v4x6w38"))))
+ (inputs `(("perl" ,perl)))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("ack" "bin/ack"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (copy-file source "ack")
+ (chmod "ack" #o0755)
+ #t)))))
+ (home-page "https://beyondgrep.com/")
+ (synopsis "ack is a grep-like source code search tool.")
+ (description "Designed for programmers with large heterogeneous trees of source code, ack is written in portable Perl 5 and takes advantage of the power of Perl's regular expressions. ack is designed as an alternative to grep for programmers.")
+ (license artistic2.0)))
+
(define-public xapian
(package
(name "xapian")
--
2.31.1
R
R
Ryan Sundberg wrote on 9 Jun 2021 09:12
(address . guix-patches@gnu.org)
f82c38c9-f1df-fad0-7034-f5fa17b9a37b@arctype.co
Revised ack patch per coding standards.

--
Sincerely,
Ryan Sundberg

On 6/6/21 4:58 PM, Ryan Sundberg wrote:
Toggle quote (62 lines)
> ack is a grep-like source code search tool.
>
> (The previous patch had the wrong home-page set.)
>
> Signed-off-by: Ryan Sundberg <ryan@arctype.co>
> ---
> gnu/packages/search.scm | 29 ++++++++++++++++++++++++++++-
> 1 file changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
> index 362eb0d95e..e4f48d5906 100644
> --- a/gnu/packages/search.scm
> +++ b/gnu/packages/search.scm
> @@ -6,6 +6,7 @@
> ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
> ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
> ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
> +;;; Copyright © 2021 Ryan Sundberg <ryan@arctype.co>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -24,11 +25,12 @@
>
> (define-module (gnu packages search)
> #:use-module ((guix licenses)
> - #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license))
> + #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license artistic2.0))
> #:use-module (guix packages)
> #:use-module (guix download)
> #: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 perl)
> #:use-module (guix build-system python)
> @@ -50,6 +52,31 @@
> #:use-module (gnu packages xdisorg)
> #:use-module (gnu packages xml))
>
> +(define-public ack
> + (package
> + (name "ack")
> + (version "3.5.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://beyondgrep.com/ack-v" version))
> + (sha256 (base32 "17wq9c1pwisbg4mcmvmdaym8hlawx209iriaxjlw9hwi0v4x6w38"))))
> + (inputs `(("perl" ,perl)))
> + (build-system copy-build-system)
> + (arguments
> + `(#:install-plan '(("ack" "bin/ack"))
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'unpack
> + (lambda* (#:key source #:allow-other-keys)
> + (copy-file source "ack")
> + (chmod "ack" #o0755)
> + #t)))))
> + (home-page "https://beyondgrep.com/")
> + (synopsis "ack is a grep-like source code search tool.")
> + (description "Designed for programmers with large heterogeneous trees of source code, ack is written in portable Perl 5 and takes advantage
of the power of Perl's regular expressions. ack is designed as an alternative to grep for programmers.")
Toggle quote (6 lines)
> + (license artistic2.0)))
> +
> (define-public xapian
> (package
> (name "xapian")
>
From fea54a57b5b4e1cdc6bd642ae499fbaafad5cb62 Mon Sep 17 00:00:00 2001
From: Ryan Sundberg <ryan@arctype.co>
Date: Sun, 31 Jan 2021 10:29:47 -0800
Subject: [PATCH] gnu: Add ack version 3.5.0

* gnu/packages/search.scm (ack): New variable.

Signed-off-by: Ryan Sundberg <ryan@arctype.co>
---
gnu/packages/search.scm | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index 362eb0d95e..d523d3f93f 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2021 Ryan Sundberg <ryan@arctype.co>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,11 +25,12 @@
(define-module (gnu packages search)
#:use-module ((guix licenses)
- #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license))
+ #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license artistic2.0))
#:use-module (guix packages)
#:use-module (guix download)
#: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 perl)
#:use-module (guix build-system python)
@@ -50,6 +52,32 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml))
+(define-public ack
+ (package
+ (name "ack")
+ (version "3.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://beyondgrep.com/ack-v" version))
+ (sha256 (base32 "17wq9c1pwisbg4mcmvmdaym8hlawx209iriaxjlw9hwi0v4x6w38"))))
+ (inputs `(("perl" ,perl)))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("ack" "bin/ack"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (copy-file source "ack")
+ (chmod "ack" #o0755)
+ #t)))))
+ (home-page "https://beyondgrep.com/")
+ (synopsis "Grep-like source code search tool")
+ (description "Ack is designed for programmers with large heterogeneous trees of
+source code, as an alternative to grep.")
+ (license artistic2.0)))
+
(define-public xapian
(package
(name "xapian")
--
2.31.1
Attachment: OpenPGP_signature
L
L
Ludovic Courtès wrote on 13 Jun 2021 22:46
Re: bug#48893: [PATCH] New package: ack
(name . Ryan Sundberg)(address . ryan@arctype.co)(address . 48893@debbugs.gnu.org)
87bl89ze4m.fsf_-_@gnu.org
Hi,

Ryan Sundberg <ryan@arctype.co> skribis:

Toggle quote (9 lines)
> From fea54a57b5b4e1cdc6bd642ae499fbaafad5cb62 Mon Sep 17 00:00:00 2001
> From: Ryan Sundberg <ryan@arctype.co>
> Date: Sun, 31 Jan 2021 10:29:47 -0800
> Subject: [PATCH] gnu: Add ack version 3.5.0
>
> * gnu/packages/search.scm (ack): New variable.
>
> Signed-off-by: Ryan Sundberg <ryan@arctype.co>

Overall this LGTM. However…

Toggle quote (12 lines)
> +(define-public ack
> + (package
> + (name "ack")
> + (version "3.5.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://beyondgrep.com/ack-v" version))
> + (sha256 (base32 "17wq9c1pwisbg4mcmvmdaym8hlawx209iriaxjlw9hwi0v4x6w38"))))
> + (inputs `(("perl" ,perl)))
> + (build-system copy-build-system)

… I noticed this:

Toggle snippet (7 lines)
$ head -4 $(./pre-inst-env guix build ack)/bin/ack
#!/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/bin/perl
#
# This file, ack, is generated code.
# Please DO NOT EDIT or send patches for it.

Could you arrange so that the ‘ack’ file is “built from source”?
We usually try hard to build everything from source.

Thanks in advance,
Ludo’.
J
J
Jelle Licht wrote on 29 May 2023 13:35
(name . Ryan Sundberg)(address . ryan@arctype.co)(address . 48893-done@debbugs.gnu.org)
878rd7nzew.fsf@fsfe.org
The package ack was made available in commit
1051db25267a9bbc0ad38be2f3ec92af40f18e18, so closing.
Closed
?