[PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher and use gexp.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Michael Rohleder
Owner
unassigned
Submitted by
Michael Rohleder
Severity
normal

Debbugs page

Michael Rohleder wrote 2 years ago
(address . guix-patches@gnu.org)(name . Michael Rohleder)(address . mike@rohleder.de)
20221001053316.731-1-mike@rohleder.de
* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
{substitute-ag-path}: Add phase to avoid propagating ag.
{install-info}: Use gexps.
[inputs]: Add the-silver-searcher.
[propagated-inputs]: Remove the-silver-searcher.
---
gnu/packages/emacs-xyz.scm | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6d9d0d6a8f..76a17da88e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3026,23 +3026,27 @@ (define-public emacs-ag
(base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'install 'make-info
- (lambda _
- (with-directory-excursion "docs"
- (invoke "make" "info"))))
- (add-after 'install 'install-info
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (info (string-append out "/share/info")))
- (install-file "docs/_build/texinfo/agel.info" info)))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'substitute-ag-path
+ (lambda _
+ (make-file-writable "ag.el")
+ (emacs-substitute-sexps "ag.el"
+ ("defcustom ag-executable" (which "ag")))))
+ (add-before 'install 'make-info
+ (lambda _
+ (with-directory-excursion "docs"
+ (invoke "make" "info"))))
+ (add-after 'install 'install-info
+ (lambda _
+ (install-file "docs/_build/texinfo/agel.info"
+ (string-append #$output "/share/info")))))))
+ (inputs (list the-silver-searcher)) ;'ag' executable
(native-inputs
(list python-sphinx texinfo))
(propagated-inputs
- (list emacs-dash
- emacs-s
- the-silver-searcher)) ;'ag' executable
+ (list emacs-dash emacs-s))
(home-page "https://github.com/Wilfred/ag.el")
(synopsis "Front-end for ag (the-silver-searcher) for Emacs")
(description "This package provides the ability to use the silver
--
2.37.3
Efraim Flashner wrote 2 years ago
(name . Michael Rohleder)(address . mike@rohleder.de)(address . 58213@debbugs.gnu.org)
YznU6XRPXBygWT2p@3900XT
On Sat, Oct 01, 2022 at 07:33:16AM +0200, Michael Rohleder wrote:
Toggle quote (59 lines)
> * gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
> {substitute-ag-path}: Add phase to avoid propagating ag.
> {install-info}: Use gexps.
> [inputs]: Add the-silver-searcher.
> [propagated-inputs]: Remove the-silver-searcher.
> ---
> gnu/packages/emacs-xyz.scm | 32 ++++++++++++++++++--------------
> 1 file changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 6d9d0d6a8f..76a17da88e 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -3026,23 +3026,27 @@ (define-public emacs-ag
> (base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
> (build-system emacs-build-system)
> (arguments
> - `(#:phases
> - (modify-phases %standard-phases
> - (add-before 'install 'make-info
> - (lambda _
> - (with-directory-excursion "docs"
> - (invoke "make" "info"))))
> - (add-after 'install 'install-info
> - (lambda* (#:key outputs #:allow-other-keys)
> - (let* ((out (assoc-ref outputs "out"))
> - (info (string-append out "/share/info")))
> - (install-file "docs/_build/texinfo/agel.info" info)))))))
> + (list
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'substitute-ag-path
> + (lambda _
> + (make-file-writable "ag.el")
> + (emacs-substitute-sexps "ag.el"
> + ("defcustom ag-executable" (which "ag")))))
> + (add-before 'install 'make-info
> + (lambda _
> + (with-directory-excursion "docs"
> + (invoke "make" "info"))))
> + (add-after 'install 'install-info
> + (lambda _
> + (install-file "docs/_build/texinfo/agel.info"
> + (string-append #$output "/share/info")))))))
> + (inputs (list the-silver-searcher)) ;'ag' executable
> (native-inputs
> (list python-sphinx texinfo))
> (propagated-inputs
> - (list emacs-dash
> - emacs-s
> - the-silver-searcher)) ;'ag' executable
> + (list emacs-dash emacs-s))
> (home-page "https://github.com/Wilfred/ag.el")
> (synopsis "Front-end for ag (the-silver-searcher) for Emacs")
> (description "This package provides the ability to use the silver
> --
> 2.37.3
>

Can you split this into two patches? The first to not propagate the
silver searcher and the second to switch to gexps? Thanks.

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmM51OkACgkQQarn3Mo9
g1F9ghAAgkwA7xZ7YtuQVsg4MhJaJowTCCGm6XwgDBrJPHihPnYDvW2qK8YrvM52
jGDrrzyHpHVDTnecj7BeExzBa4kn/mfDFBFek+/aGX17ExvCZaXkincbWwm+Xz05
rfJ9sywZigc9xvYMytD9je4BzD5m/zpJWqIShr7d8NbgxovBeYGX8nM8aNpeYDGq
HJKyFmPkzf8fxd6xnvqwPvSYhrnS+bJ8c/7K1meResdJTWiNpZ6hIoZ+e8qCM4cr
O8nQ7KRwJZ9uxfFSIB3cfXvF1Au2fl+A60kAEpbxTnmvbXAI6s6aI4irg+LVzzpR
6blgghsmCAxBcX56sI4HDjnScyteXovhZTfUpWkF0l+CmNPtYaRC3z5jbUBaC4Gh
qlhik61wmDpUfl2Fk53idFN0A9/kYYUzJSb/BPrcwQynpxFS2kIHZnHgvq01YMYr
ZLXFwZyEFNC6lVPadopSKJi32Fje5odDTPywZ6lqfQUPz/EKDY7tdY0r7niW5REq
Ze0atvouyvAm66el5TYnf7OKEE+0QmTvVlQzUZeGZUI0zbXo9iqKuq4P1lgQx89S
dADCAhMs46p6pdB0+RER7RXAzQMDy2TtkC8Ba1y68fhyQYOs4vvvUQXWL+MFKmdo
aFF2GTqKTyCw+WPJio05z42WK9m60WGOdpVKVwlsMBbHFnQ6D4A=
=O50R
-----END PGP SIGNATURE-----


Michael Rohleder wrote 2 years ago
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 58213@debbugs.gnu.org)
8735c6t0ss.fsf@rohleder.de
Hi Efraim!

Thanks for reviewing!

Efraim Flashner <efraim@flashner.co.il> writes:
Toggle quote (2 lines)
> Can you split this into two patches? The first to not propagate the
> silver searcher and the second to switch to gexps? Thanks.
From 040aa27ca507032e8c02e02a90dc2e7aaecf4511 Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Sun, 2 Oct 2022 22:01:17 +0200
Subject: [PATCH] gnu: emacs-ag: Use gexps.

* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
{install-info}: Adjust for gexps.
---
gnu/packages/emacs-xyz.scm | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 93ad1a6fbf..f907838dc8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3026,17 +3026,17 @@ (define-public emacs-ag
(base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'install 'make-info
- (lambda _
- (with-directory-excursion "docs"
- (invoke "make" "info"))))
- (add-after 'install 'install-info
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (info (string-append out "/share/info")))
- (install-file "docs/_build/texinfo/agel.info" info)))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'make-info
+ (lambda _
+ (with-directory-excursion "docs"
+ (invoke "make" "info"))))
+ (add-after 'install 'install-info
+ (lambda _
+ (install-file "docs/_build/texinfo/agel.info"
+ (string-append #$output "/share/info")))))))
(native-inputs
(list python-sphinx texinfo))
(propagated-inputs
--
2.37.3
This applies to the first one. I changed emacs-substitute-sexps to
emacs-substitute-variables.
From f3ace8a1daa1a40c90c08043df42d0af4864e5cb Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Sun, 2 Oct 2022 22:25:56 +0200
Subject: [PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher.

* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Add phase substitute-ag-path
to avoid propagating ag.
[inputs]: Add the-silver-searcher.
[propagated-inputs]: Remove the-silver-searcher.
---
gnu/packages/emacs-xyz.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f907838dc8..ff2d45500e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3029,6 +3029,11 @@ (define-public emacs-ag
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'substitute-ag-path
+ (lambda _
+ (make-file-writable "ag.el")
+ (emacs-substitute-variables "ag.el"
+ ("ag-executable" (which "ag")))))
(add-before 'install 'make-info
(lambda _
(with-directory-excursion "docs"
@@ -3037,12 +3042,11 @@ (define-public emacs-ag
(lambda _
(install-file "docs/_build/texinfo/agel.info"
(string-append #$output "/share/info")))))))
+ (inputs (list the-silver-searcher))
(native-inputs
(list python-sphinx texinfo))
(propagated-inputs
- (list emacs-dash
- emacs-s
- the-silver-searcher)) ;'ag' executable
+ (list emacs-dash emacs-s))
(home-page "https://github.com/Wilfred/ag.el")
(synopsis "Front-end for ag (the-silver-searcher) for Emacs")
(description "This package provides the ability to use the silver
--
2.37.3
--
I still maintain the point that designing a monolithic kernel in 1991 is a
fundamental error. Be thankful you are not my student. You would not get a
high grade for such a design :-)
(Andrew Tanenbaum to Linus Torvalds)
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCAAvFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAmM597MRHG1pa2VAcm9o
bGVkZXIuZGUACgkQfHr/vv7yyyVhNwf/dAWtCLmfP47VXGEtzGDVvlGHhk1aYjp4
31DG069Ugp7A6Rowtari0Eff9r5ctvzF9prgQXDorIxIZRM4ghbeIaqRrbMFPjIj
ouL5dYTTxsFRU/aAq8E2B409W2ZlRDZHJCXKGFvOHkjVhK0qOjBCh6uC3Snh3RgE
662T9r6iOPHyKwmGo5IzexHHx76E1NJthttHoxgmTNerx2zObggUxLVU0tm5Nv2M
5j2iAk7YGCefMOUKr7MJtasRKwgRwSmD+C+Slb+QRl8OhbF9/EPxNtQYOdmxJZsa
JhREYXlkJtbgAX9CLD/fFjxdmD/TfXDK9cBk7ErljZbWUezg3Wm4bg==
=/Rd2
-----END PGP SIGNATURE-----

Efraim Flashner wrote 2 years ago
(name . Michael Rohleder)(address . mike@rohleder.de)(address . 58213-done@debbugs.gnu.org)
YzqRNiypAT8Z0iyf@3900XT
On Sun, Oct 02, 2022 at 10:42:27PM +0200, Michael Rohleder wrote:
Toggle quote (8 lines)
> Hi Efraim!
>
> Thanks for reviewing!
>
> Efraim Flashner <efraim@flashner.co.il> writes:
> > Can you split this into two patches? The first to not propagate the
> > silver searcher and the second to switch to gexps? Thanks.

Thanks. Patches pushed!

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmM6kTMACgkQQarn3Mo9
g1H65g//XGeYcPf98kTAaHmxN4ZiwHdNcnTBpyqNlsZZB4b35kzFaPHzQdHOSRTZ
7dbo3mdq4Mm3+yaNooiK9pSo10wSmBLXQnqF19ytt2FGeY9BDOeuCOJ57zPPLTFD
kaIvKXppnTY6aE1tMzMPLBeFwiN7VagSxctBFcMiAaAwlJscLB7hznCPFs/l+OwT
eTILqM8ukWx1MIicX+nTB6ls+EvtGiN4Bt9HGrhYzZ6/HzW27SYj3SC/tWn2fbdi
m7ZVL7zX2w1xtpZWOF+rmP4K8+ofJ2JKSa9BgHAXcSN3jNCabApQxHvpgSYaX+i0
QEWhXji5kj/RBfgKjBPSF2o3MB9dFq4YkX2ppFZFFdWfoICPQev6TPMuZnv/C/i8
evZqqOpq6BEz21iaFXaqfcVsuBvvewoaqPrIiZBWPB89elFClMP2Tp4FBE8ebv4x
8034gjnGrSv6b7KtxilKw9mqukqUKfjvM94m78iDdmgeoEz6S6B1gezY7pQWHlPu
MP8ZzXfY9q1mVLvW0eT4SH4bkDrf9cCVuR5sPyO7YIQRlGXj9NPZ5Og6faJGpkaf
Ie+cojs9mmhvOLdmiV4ReIfzMVSwlhEFluZpicpWu4RDzb9ikeLO9HJxjymCiQ8i
TU+yq9C102URU1E78nnUmHsu3oxStAB1Zd3VL9C7Us5oNTUVvkI=
=EmDk
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58213@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58213
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help