Package: guix-patches;
Reported by: Xinglu Chen <public <at> yoctocell.xyz>
Date: Mon, 16 Aug 2021 14:11:01 UTC
Severity: normal
Tags: patch
Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
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 50077 in the body.
You can then email your comments to 50077 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
mail <at> nicolasgoaziou.fr, andrew <at> trop.in, guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Mon, 16 Aug 2021 14:11:02 GMT) Full text and rfc822 format available.Xinglu Chen <public <at> yoctocell.xyz>
:mail <at> nicolasgoaziou.fr, andrew <at> trop.in, guix-patches <at> gnu.org
.
(Mon, 16 Aug 2021 14:11:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: guix-patches <at> gnu.org Subject: [PATCH 0/3] Various improvements to Notmuch Date: Mon, 16 Aug 2021 16:10:23 +0200
Adding an extra ‘emacs’ output would allow one to propagate notmuch.el without propagating the Notmuch executable and libnotmuch. This was mentioned in <https://issues.guix.gnu.org/49457#2>. Xinglu Chen (3): gnu: notmuch: Add separate 'emacs' output. gnu: notmuch: Build Info manual. gnu: notmuch: Use 'cc-for-target' instead of hardcoding 'gcc'. gnu/packages/mail.scm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) base-commit: 0fa49fd2a8f0d1d2c37ea276cc44d0d5adcea701 -- 2.32.0
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Mon, 16 Aug 2021 14:13:02 GMT) Full text and rfc822 format available.Message #8 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>, Andrew Tropin <andrew <at> trop.in> Subject: [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output. Date: Mon, 16 Aug 2021 16:12:19 +0200
* gnu/packages/mail.scm (notmuch)[outputs]: Add ‘emacs’ output [arguments]<#:modules>: Add (guix build emacs-utils). <#:phases>{configure}: Use the ‘emacs’ output. {make-autoloads}: Modify the default ‘make-autoloads’ phase to use the ‘emacs’ output. --- gnu/packages/mail.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index ccf44b7cf3..bbc616f6f5 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1337,7 +1337,8 @@ invoking @command{notifymuch} from the post-new hook.") (arguments `(#:modules ((guix build gnu-build-system) ((guix build emacs-build-system) #:prefix emacs:) - (guix build utils)) + (guix build utils) + (guix build emacs-utils)) #:imported-modules (,@%gnu-build-system-modules (guix build emacs-build-system) (guix build emacs-utils)) @@ -1355,7 +1356,8 @@ invoking @command{notifymuch} from the post-new hook.") (setenv "CONFIG_SHELL" (which "sh")) (let* ((out (assoc-ref outputs "out")) - (elisp (emacs:elpa-directory out))) + (emacs (assoc-ref outputs "emacs")) + (elisp (emacs:elpa-directory emacs))) (invoke "./configure" (string-append "--prefix=" out) (string-append "--emacslispdir=" elisp) @@ -1373,7 +1375,14 @@ invoking @command{notifymuch} from the post-new hook.") (substitute* (find-files "test" "\\.sh$") (("/bin/sh") (which "sh"))))) (add-after 'install 'make-autoloads - (assoc-ref emacs:%standard-phases 'make-autoloads))))) + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")) + (out (assoc-ref outputs "emacs")) + (elpa-name-ver ((@@ (guix build emacs-build-system) + store-directory->elpa-name-version) out)) + (elpa-name (package-name->name+version elpa-name-ver)) + (el-dir (emacs:elpa-directory out))) + (emacs-generate-autoloads elpa-name el-dir))))))) (native-inputs `(("bash-completion" ,bash-completion) ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests @@ -1394,6 +1403,7 @@ invoking @command{notifymuch} from the post-new hook.") ("talloc" ,talloc) ("xapian" ,xapian) ("zlib" ,zlib))) + (outputs '("out" "emacs")) (home-page "https://notmuchmail.org/") (synopsis "Thread-based email index, search, and tagging") (description -- 2.32.0
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Mon, 16 Aug 2021 14:13:02 GMT) Full text and rfc822 format available.Message #11 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Subject: [PATCH 2/3] gnu: notmuch: Build Info manual. Date: Mon, 16 Aug 2021 16:12:32 +0200
* gnu/packages/mail.scm (notmuch)[native-inputs]: Add 'texinfo'. --- gnu/packages/mail.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index bbc616f6f5..66e0d2482d 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1390,6 +1390,7 @@ invoking @command{notifymuch} from the post-new hook.") ("python" ,python) ("python-docutils" ,python-docutils) ("sphinx" ,python-sphinx) + ("texinfo" ,texinfo) ;; The following are required for tests only. ("which" ,which) -- 2.32.0
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Mon, 16 Aug 2021 14:13:03 GMT) Full text and rfc822 format available.Message #14 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Subject: [PATCH 3/3] gnu: notmuch: Use 'cc-for-target' instead of hardcoding 'gcc'. Date: Mon, 16 Aug 2021 16:12:40 +0200
* gnu/packages/mail.scm (notmuch)[arguments]<#:phases>: Use 'cc-for-target' instead of 'gcc'. --- gnu/packages/mail.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 66e0d2482d..2c2d740f9b 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1352,7 +1352,7 @@ invoking @command{notifymuch} from the post-new hook.") (("/bin/sh") (which "sh"))))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) - (setenv "CC" "gcc") + (setenv "CC" ,(cc-for-target)) (setenv "CONFIG_SHELL" (which "sh")) (let* ((out (assoc-ref outputs "out")) @@ -1370,7 +1370,7 @@ invoking @command{notifymuch} from the post-new hook.") (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0")))) (add-before 'check 'prepare-test-environment (lambda _ - (setenv "TEST_CC" "gcc") + (setenv "TEST_CC" ,(cc-for-target)) ;; Patch various inline shell invocations. (substitute* (find-files "test" "\\.sh$") (("/bin/sh") (which "sh"))))) -- 2.32.0
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Sat, 28 Aug 2021 10:35:02 GMT) Full text and rfc822 format available.Message #17 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: Andrew Tropin <andrew <at> trop.in> Cc: 50077 <at> debbugs.gnu.org Subject: Re: [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output. Date: Sat, 28 Aug 2021 12:34:16 +0200
[Message part 1 (text/plain, inline)]
[ Debbugs wasn’t Cc’d in the previous message ] On Mon, Aug 23 2021, Andrew Tropin wrote: > On 2021-08-16 16:12, Xinglu Chen wrote: > >> * gnu/packages/mail.scm (notmuch)[outputs]: Add ‘emacs’ output >> [arguments]<#:modules>: Add (guix build emacs-utils). >> <#:phases>{configure}: Use the ‘emacs’ output. >> {make-autoloads}: Modify the default ‘make-autoloads’ phase to use the ‘emacs’ >> output. >> --- >> gnu/packages/mail.scm | 16 +++++++++++++--- >> 1 file changed, 13 insertions(+), 3 deletions(-) >> >> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm >> index ccf44b7cf3..bbc616f6f5 100644 >> --- a/gnu/packages/mail.scm >> +++ b/gnu/packages/mail.scm >> @@ -1337,7 +1337,8 @@ invoking @command{notifymuch} from the post-new hook.") >> (arguments >> `(#:modules ((guix build gnu-build-system) >> ((guix build emacs-build-system) #:prefix emacs:) >> - (guix build utils)) >> + (guix build utils) >> + (guix build emacs-utils)) >> #:imported-modules (,@%gnu-build-system-modules >> (guix build emacs-build-system) >> (guix build emacs-utils)) >> @@ -1355,7 +1356,8 @@ invoking @command{notifymuch} from the post-new hook.") >> (setenv "CONFIG_SHELL" (which "sh")) >> >> (let* ((out (assoc-ref outputs "out")) >> - (elisp (emacs:elpa-directory out))) >> + (emacs (assoc-ref outputs "emacs")) >> + (elisp (emacs:elpa-directory emacs))) >> (invoke "./configure" >> (string-append "--prefix=" out) >> (string-append "--emacslispdir=" elisp) >> @@ -1373,7 +1375,14 @@ invoking @command{notifymuch} from the post-new hook.") >> (substitute* (find-files "test" "\\.sh$") >> (("/bin/sh") (which "sh"))))) >> (add-after 'install 'make-autoloads >> - (assoc-ref emacs:%standard-phases 'make-autoloads))))) >> + (lambda* (#:key outputs inputs #:allow-other-keys) >> + (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")) >> + (out (assoc-ref outputs "emacs")) >> + (elpa-name-ver ((@@ (guix build emacs-build-system) >> + store-directory->elpa-name-version) out)) >> + (elpa-name (package-name->name+version elpa-name-ver)) >> + (el-dir (emacs:elpa-directory out))) >> + (emacs-generate-autoloads elpa-name el-dir))))))) >> (native-inputs >> `(("bash-completion" ,bash-completion) >> ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests >> @@ -1394,6 +1403,7 @@ invoking @command{notifymuch} from the post-new hook.") >> ("talloc" ,talloc) >> ("xapian" ,xapian) >> ("zlib" ,zlib))) >> + (outputs '("out" "emacs")) >> (home-page "https://notmuchmail.org/") >> (synopsis "Thread-based email index, search, and tagging") >> (description > > The separate output is ok, but I think making a separate emacs-notmuch > package looks more consistent. We can inherit it from notmuch package > to be sure that the packages are built from the same source code. Why would it be more consistent to make a separate package? Making a separate package is usually used for packaging a slightly different version of the “regular” package, e.g., ‘emacs-next-pgtk’ adds native compilation and pure GTK support for Emacs., ‘emacs-no-x’ removes X suport for ‘emacs’. ‘emacs-notmuch’ isn’t really a different version of ‘notmuch’, it’s just ‘notmuch’ but with all the non-Elisp stuff removed. This is usually what using different outputs tries to achieve, e.g., separate documentation from the main package, or in this case, separate Elisp stuff from the main package. The ‘notmuch’ package in Nixpkgs also uses multiple outputs[1], which I think makes sense. <https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/mailreaders/notmuch/default.nix> > > Thank you for working on this, the changes are good and useful!) You are welcome! :-)
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Mon, 30 Aug 2021 07:15:02 GMT) Full text and rfc822 format available.Message #20 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Andrew Tropin <andrew <at> trop.in> To: Xinglu Chen <public <at> yoctocell.xyz> Cc: 50077 <at> debbugs.gnu.org Subject: Re: [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output. Date: Mon, 30 Aug 2021 10:14:46 +0300
[Message part 1 (text/plain, inline)]
On 2021-08-28 12:34, Xinglu Chen wrote: > [ Debbugs wasn’t Cc’d in the previous message ] > Oops) > > On Mon, Aug 23 2021, Andrew Tropin wrote: > >> On 2021-08-16 16:12, Xinglu Chen wrote: >> >>> * gnu/packages/mail.scm (notmuch)[outputs]: Add ‘emacs’ output >>> [arguments]<#:modules>: Add (guix build emacs-utils). >>> <#:phases>{configure}: Use the ‘emacs’ output. >>> {make-autoloads}: Modify the default ‘make-autoloads’ phase to use the ‘emacs’ >>> output. >>> --- >>> gnu/packages/mail.scm | 16 +++++++++++++--- >>> 1 file changed, 13 insertions(+), 3 deletions(-) >>> >>> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm >>> index ccf44b7cf3..bbc616f6f5 100644 >>> --- a/gnu/packages/mail.scm >>> +++ b/gnu/packages/mail.scm >>> @@ -1337,7 +1337,8 @@ invoking @command{notifymuch} from the post-new hook.") >>> (arguments >>> `(#:modules ((guix build gnu-build-system) >>> ((guix build emacs-build-system) #:prefix emacs:) >>> - (guix build utils)) >>> + (guix build utils) >>> + (guix build emacs-utils)) >>> #:imported-modules (,@%gnu-build-system-modules >>> (guix build emacs-build-system) >>> (guix build emacs-utils)) >>> @@ -1355,7 +1356,8 @@ invoking @command{notifymuch} from the post-new hook.") >>> (setenv "CONFIG_SHELL" (which "sh")) >>> >>> (let* ((out (assoc-ref outputs "out")) >>> - (elisp (emacs:elpa-directory out))) >>> + (emacs (assoc-ref outputs "emacs")) >>> + (elisp (emacs:elpa-directory emacs))) >>> (invoke "./configure" >>> (string-append "--prefix=" out) >>> (string-append "--emacslispdir=" elisp) >>> @@ -1373,7 +1375,14 @@ invoking @command{notifymuch} from the post-new hook.") >>> (substitute* (find-files "test" "\\.sh$") >>> (("/bin/sh") (which "sh"))))) >>> (add-after 'install 'make-autoloads >>> - (assoc-ref emacs:%standard-phases 'make-autoloads))))) >>> + (lambda* (#:key outputs inputs #:allow-other-keys) >>> + (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")) >>> + (out (assoc-ref outputs "emacs")) >>> + (elpa-name-ver ((@@ (guix build emacs-build-system) >>> + store-directory->elpa-name-version) out)) >>> + (elpa-name (package-name->name+version elpa-name-ver)) >>> + (el-dir (emacs:elpa-directory out))) >>> + (emacs-generate-autoloads elpa-name el-dir))))))) >>> (native-inputs >>> `(("bash-completion" ,bash-completion) >>> ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests >>> @@ -1394,6 +1403,7 @@ invoking @command{notifymuch} from the post-new hook.") >>> ("talloc" ,talloc) >>> ("xapian" ,xapian) >>> ("zlib" ,zlib))) >>> + (outputs '("out" "emacs")) >>> (home-page "https://notmuchmail.org/") >>> (synopsis "Thread-based email index, search, and tagging") >>> (description >> >> The separate output is ok, but I think making a separate emacs-notmuch >> package looks more consistent. We can inherit it from notmuch package >> to be sure that the packages are built from the same source code. > > Why would it be more consistent to make a separate package? Making a > separate package is usually used for packaging a slightly different > version of the “regular” package, e.g., ‘emacs-next-pgtk’ adds native > compilation and pure GTK support for Emacs., ‘emacs-no-x’ removes X > suport for ‘emacs’. ‘emacs-notmuch’ isn’t really a different version of > ‘notmuch’, it’s just ‘notmuch’ but with all the non-Elisp stuff > removed. This is usually what using different outputs tries to achieve, > e.g., separate documentation from the main package, or in this case, > separate Elisp stuff from the main package. > Almost all elisp packages in Guix have a emacs- prefix, so as a user I expect to find notmuch*.el in emacs-notmuch package and notmuch binary in notmuch package, despite the fact that upstream distributes the source code for both of them in one tarball. Moreover, with emacs-notmuch and notmuch packages it's possible to use different build systems, which helps in automated package modification, for example I want to native compile all emacs packages or generate some additional metainformation, I just find all packages in my profile with emacs-build-system and modify phases accordingly. Yes, it's possible to do such modification for other packages manually, but it feels hacky and inconvinient. The separate output can work, but a separate package looks better to me. P.S. I know that there are some emacs packages in Guix already, which doesn't use emacs-build-system, but I think we should keep that number as low as possible and ideally to make it equal to 0 =) > > The ‘notmuch’ package in Nixpkgs also uses multiple outputs[1], which > I think makes sense. > > <https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/mailreaders/notmuch/default.nix> >> >> Thank you for working on this, the changes are good and useful!) > > You are welcome! :-)
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Mon, 30 Aug 2021 13:34:01 GMT) Full text and rfc822 format available.Message #23 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: Andrew Tropin <andrew <at> trop.in> Cc: 50077 <at> debbugs.gnu.org Subject: Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Mon, 30 Aug 2021 15:33:32 +0200
[Message part 1 (text/plain, inline)]
On Mon, Aug 30 2021, Andrew Tropin wrote: >> Why would it be more consistent to make a separate package? Making a >> separate package is usually used for packaging a slightly different >> version of the “regular” package, e.g., ‘emacs-next-pgtk’ adds native >> compilation and pure GTK support for Emacs., ‘emacs-no-x’ removes X >> suport for ‘emacs’. ‘emacs-notmuch’ isn’t really a different version of >> ‘notmuch’, it’s just ‘notmuch’ but with all the non-Elisp stuff >> removed. This is usually what using different outputs tries to achieve, >> e.g., separate documentation from the main package, or in this case, >> separate Elisp stuff from the main package. >> > > Almost all elisp packages in Guix have a emacs- prefix, so as a user I > expect to find notmuch*.el in emacs-notmuch package and notmuch binary > in notmuch package, despite the fact that upstream distributes the > source code for both of them in one tarball. Good point, however, If we were to have separate ‘emacs-’ packages for the packages that also contain Elisp stuff, should those packages still include the Emacs package in their output, i.e., should the ‘notmuch’ package still include notmuch.el, or should the Elisp stuff only be in ‘emacs-notmuch’? > Moreover, with emacs-notmuch and notmuch packages it's possible to use > different build systems, which helps in automated package > modification, for example I want to native compile all emacs packages > or generate some additional metainformation, I just find all packages > in my profile with emacs-build-system and modify phases accordingly. > Yes, it's possible to do such modification for other packages > manually, but it feels hacky and inconvinient. This sounds like an interesting use-case, but I don’t know how useful this will be for most people.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Wed, 01 Sep 2021 09:51:01 GMT) Full text and rfc822 format available.Message #26 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Andrew Tropin <andrew <at> trop.in> To: Xinglu Chen <public <at> yoctocell.xyz> Cc: 50077 <at> debbugs.gnu.org Subject: Re: Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Wed, 01 Sep 2021 12:50:35 +0300
[Message part 1 (text/plain, inline)]
On 2021-08-30 15:33, Xinglu Chen wrote: > On Mon, Aug 30 2021, Andrew Tropin wrote: > >>> Why would it be more consistent to make a separate package? Making a >>> separate package is usually used for packaging a slightly different >>> version of the “regular” package, e.g., ‘emacs-next-pgtk’ adds native >>> compilation and pure GTK support for Emacs., ‘emacs-no-x’ removes X >>> suport for ‘emacs’. ‘emacs-notmuch’ isn’t really a different version of >>> ‘notmuch’, it’s just ‘notmuch’ but with all the non-Elisp stuff >>> removed. This is usually what using different outputs tries to achieve, >>> e.g., separate documentation from the main package, or in this case, >>> separate Elisp stuff from the main package. >>> >> >> Almost all elisp packages in Guix have a emacs- prefix, so as a user I >> expect to find notmuch*.el in emacs-notmuch package and notmuch binary >> in notmuch package, despite the fact that upstream distributes the >> source code for both of them in one tarball. > > Good point, however, If we were to have separate ‘emacs-’ packages for > the packages that also contain Elisp stuff, should those packages still > include the Emacs package in their output, i.e., should the ‘notmuch’ > package still include notmuch.el, or should the Elisp stuff only be in > ‘emacs-notmuch’? > IMO, notmuch package should not include Elisp stuff, at least I don't see use cases, where it can be useful, but see where it can be harmful. > >> Moreover, with emacs-notmuch and notmuch packages it's possible to use >> different build systems, which helps in automated package >> modification, for example I want to native compile all emacs packages >> or generate some additional metainformation, I just find all packages >> in my profile with emacs-build-system and modify phases accordingly. >> Yes, it's possible to do such modification for other packages >> manually, but it feels hacky and inconvinient. > > This sounds like an interesting use-case, but I don’t know how useful > this will be for most people. Even if there are not so many people, who do it right now or even in some future, it's very likely that some derivative distribution with considerable amount of users will appear, which will be utilizing such capabilities. Actually, the exact use case doesn't matter so much, but the whole picture, where you need to track every package, which picks some phases of one build system to make sure that your transformation of package list works correctly is. More regular and consistent package definitions are, the easier and simplier to transform them programmatically.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Wed, 01 Sep 2021 12:06:01 GMT) Full text and rfc822 format available.Message #29 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: Andrew Tropin <andrew <at> trop.in> Cc: 50077 <at> debbugs.gnu.org, guix-devel <at> gnu.org Subject: Re: [bug#50077] Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Wed, 01 Sep 2021 14:05:40 +0200
[Message part 1 (text/plain, inline)]
On Wed, Sep 01 2021, Andrew Tropin wrote: > On 2021-08-30 15:33, Xinglu Chen wrote: > >> On Mon, Aug 30 2021, Andrew Tropin wrote: >> >>>> Why would it be more consistent to make a separate package? Making a >>>> separate package is usually used for packaging a slightly different >>>> version of the “regular” package, e.g., ‘emacs-next-pgtk’ adds native >>>> compilation and pure GTK support for Emacs., ‘emacs-no-x’ removes X >>>> suport for ‘emacs’. ‘emacs-notmuch’ isn’t really a different version of >>>> ‘notmuch’, it’s just ‘notmuch’ but with all the non-Elisp stuff >>>> removed. This is usually what using different outputs tries to achieve, >>>> e.g., separate documentation from the main package, or in this case, >>>> separate Elisp stuff from the main package. >>>> >>> >>> Almost all elisp packages in Guix have a emacs- prefix, so as a user I >>> expect to find notmuch*.el in emacs-notmuch package and notmuch binary >>> in notmuch package, despite the fact that upstream distributes the >>> source code for both of them in one tarball. >> >> Good point, however, If we were to have separate ‘emacs-’ packages for >> the packages that also contain Elisp stuff, should those packages still >> include the Emacs package in their output, i.e., should the ‘notmuch’ >> package still include notmuch.el, or should the Elisp stuff only be in >> ‘emacs-notmuch’? >> > > IMO, notmuch package should not include Elisp stuff, at least I don't > see use cases, where it can be useful, but see where it can be > harmful. Should this apply to other packages that contains Elisp stuff too, or is it specific to ‘notmuch’? Cc’ing guix-devel to see what other people think before we start breaking people’s setups. :-)
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Wed, 01 Sep 2021 12:49:02 GMT) Full text and rfc822 format available.Message #32 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <leo.prikler <at> student.tugraz.at> To: Xinglu Chen <public <at> yoctocell.xyz>, Andrew Tropin <andrew <at> trop.in> Cc: 50077 <at> debbugs.gnu.org, guix-devel <at> gnu.org Subject: Re: [bug#50077] Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Wed, 01 Sep 2021 14:48:17 +0200
Am Mittwoch, den 01.09.2021, 14:05 +0200 schrieb Xinglu Chen: > > IMO, notmuch package should not include Elisp stuff, at least I > > don't see use cases, where it can be useful, but see where it can > > be harmful. > > Should this apply to other packages that contains Elisp stuff too, or > is it specific to ‘notmuch’? > > Cc’ing guix-devel to see what other people think before we start > breaking people’s setups. :-) In my personal opinion providing a separate package (perhaps one using emacs-build-system) is to be preferred as per the principle of least surprise. However, in some situations we might want to hold back on that, e.g. if providing an extra emacs package would entail propagating the original package just because. On current master, there's quite a number of packages that require mixing emacs-build-system into something else. Reducing this number would make changes to emacs-build-system cause less breakages, some of which we've seen in the past and some of which could possibly happen in the future, if e.g. post native-compilation we realize that we need an extra phase to deal with <insert stuff here>. TL;DR: I'm generally in favor of branching emacs support packages off, even if origins are to be inherited. Regards
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Wed, 01 Sep 2021 13:54:01 GMT) Full text and rfc822 format available.Message #35 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: zimoun <zimon.toutoune <at> gmail.com> To: Xinglu Chen <public <at> yoctocell.xyz>, Andrew Tropin <andrew <at> trop.in> Cc: 50077 <at> debbugs.gnu.org, guix-devel <at> gnu.org Subject: Re: [bug#50077] Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Wed, 01 Sep 2021 15:52:01 +0200
Hi, On Wed, 01 Sep 2021 at 14:05, Xinglu Chen <public <at> yoctocell.xyz> wrote: > Cc’ing guix-devel to see what other people think before we start > breaking people’s setups. :-) I agree with this Andrew’s comment: P.S. I know that there are some emacs packages in Guix already, which doesn't use emacs-build-system, but I think we should keep that number as low as possible and ideally to make it equal to 0 =) <http://issues.guix.gnu.org/issue/50077#5> If I do: guix install emacs-next notmuch then there is no guarantee that “M-x notmuch” will work. Because ’notmuch.el’ is byte-compiled using ’emacs-no-x’. The issue is that some Emacs packages rely on ’emacs-minimal’, others on ’emacs-no-x’ as input, others on other Emacs VM variant, therefore the transformation guix build -m manifest.scm --with-input=emacs-minimal=emacs-next will not work, as pointed by Nicolas here [1]. Well, you will tell me that ’outputs’ does not change much the issue. :-) For sure, but IMHO having Emacs packages using ’emacs-build-system’ eases the write of generic transformation. Well, there is enough corner cases with Emacs packages using ’emacs-build-system’ which rewriting their ’#:emacs’ argument. Other speaking about Emacs packages using other build systems. Another point is, if I want to build ’notmuch’ but I am not an Emacs user, then: guix environment notmuch will download ’emacs-no-x’ for nothing. When my network is poor, I am unhappy. Although, it is already the case. :-) Well, this is something known, see: <https://git.savannah.gnu.org/cgit/guix.git/tree/TODO#n37> I am not convinced that several outputs help. And generally speaking, personally, I tend to prefer package inherit over several outputs. Matter of taste I guess. :-) Without speaking about cross-compilation. ;-) From my point of view, I would split the package ’notmuch’ and propagate this new ’notmuch’ package with a new ’emacs-notmuch’ (if ’notmuch.el’ requires it). Well, from my point of view, it would be how to improve the situation. :-) All the best, simon 1: <http://issues.guix.gnu.org/41732#14>
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Wed, 01 Sep 2021 23:42:01 GMT) Full text and rfc822 format available.Message #38 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Carlo Zancanaro <carlo <at> zancanaro.id.au> To: Liliana Marie Prikler <leo.prikler <at> student.tugraz.at> Cc: 50077 <at> debbugs.gnu.org, guix-devel <at> gnu.org, Xinglu Chen <public <at> yoctocell.xyz>, Andrew Tropin <andrew <at> trop.in> Subject: Re: [bug#50077] Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Thu, 02 Sep 2021 09:25:32 +1000
On Wed, Sep 01 2021, Liliana Marie Prikler wrote: > TL;DR: I'm generally in favor of branching emacs support > packages off, even if origins are to be inherited. This is my preference, and there is precedent for this in Guix already. I know of emacs-protobuf-mode and emacs-erlang which are separate packages, but which reference the source of an existing package (with (package-source protobuf) and (package-source erlang), respectively). I like how easy it is to discover Emacs packages by looking for the emacs- prefix. Mu and notmuch already violate that prefix expectation, moving their elisp into a separate output would be further hiding the Emacs modes. Carlo
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Fri, 03 Sep 2021 16:15:02 GMT) Full text and rfc822 format available.Message #41 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: Carlo Zancanaro <carlo <at> zancanaro.id.au>, Liliana Marie Prikler <leo.prikler <at> student.tugraz.at> Cc: 50077 <at> debbugs.gnu.org, guix-devel <at> gnu.org, Andrew Tropin <andrew <at> trop.in> Subject: Re: [bug#50077] Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Date: Fri, 03 Sep 2021 18:14:42 +0200
[Message part 1 (text/plain, inline)]
On Thu, Sep 02 2021, Carlo Zancanaro wrote: > On Wed, Sep 01 2021, Liliana Marie Prikler wrote: >> TL;DR: I'm generally in favor of branching emacs support >> packages off, even if origins are to be inherited. > > This is my preference, and there is precedent for this in Guix > already. I know of emacs-protobuf-mode and emacs-erlang which are > separate packages, but which reference the source of an existing > package (with (package-source protobuf) and (package-source > erlang), respectively). > > I like how easy it is to discover Emacs packages by looking for > the emacs- prefix. Mu and notmuch already violate that prefix > expectation, moving their elisp into a separate output would be > further hiding the Emacs modes. > > Carlo Looks like there is consensus on the matter, unless someone objects, I will send an updated series that adds ‘emacs-notmuch’ instead of adding an extra output to ‘notmuch’. :-)
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Sat, 04 Sep 2021 09:42:02 GMT) Full text and rfc822 format available.Message #44 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Cc: Andrew Tropin <andrew <at> trop.in> Subject: [PATCH v2 0/3] Improvements to Notmuch Date: Sat, 04 Sep 2021 11:41:22 +0200
[Message part 1 (text/plain, inline)]
Changes since v1: * Add separate ‘emacs-notmuch’ package instead of ‘emacs’ output, and adjust other Emacs packages accordingly. Xinglu Chen (3): gnu: notmuch: Build Texinfo manual. gnu: notmuch: Make cross-compilable. gnu: Add emacs-notmuch. gnu/packages/emacs-xyz.scm | 8 ++++-- gnu/packages/mail.scm | 57 +++++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 25 deletions(-) base-commit: 9540323458de87b0b8aa421e449a4fe27af7c393 -- 2.33.0
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Sat, 04 Sep 2021 09:42:02 GMT) Full text and rfc822 format available.Message #47 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Subject: [PATCH v2 1/3] gnu: notmuch: Build Texinfo manual. Date: Sat, 04 Sep 2021 11:41:36 +0200
* gnu/packages/mail.scm (notmuch)[native-inputs]: Add 'texinfo'. --- gnu/packages/mail.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 87094cb9eb..eb141c5984 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1388,6 +1388,7 @@ invoking @command{notifymuch} from the post-new hook.") ("python" ,python) ("python-docutils" ,python-docutils) ("sphinx" ,python-sphinx) + ("texinfo" ,texinfo) ;; The following are required for tests only. ("which" ,which) -- 2.33.0
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Sat, 04 Sep 2021 09:42:02 GMT) Full text and rfc822 format available.Message #50 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Subject: [PATCH v2 2/3] gnu: notmuch: Make cross-compilable. Date: Sat, 04 Sep 2021 11:41:53 +0200
* gnu/packages/mail.scm (notmuch)[arguments]<#:phases>: Use 'cc-for-target' instead of 'gcc'. --- gnu/packages/mail.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index eb141c5984..173982cb12 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1358,7 +1358,7 @@ invoking @command{notifymuch} from the post-new hook.") (("/bin/sh") (which "sh"))))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) - (setenv "CC" "gcc") + (setenv "CC" ,(cc-for-target)) (setenv "CONFIG_SHELL" (which "sh")) (let* ((out (assoc-ref outputs "out")) @@ -1375,7 +1375,7 @@ invoking @command{notifymuch} from the post-new hook.") (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0")))) (add-before 'check 'prepare-test-environment (lambda _ - (setenv "TEST_CC" "gcc") + (setenv "TEST_CC" ,(cc-for-target)) ;; Patch various inline shell invocations. (substitute* (find-files "test" "\\.sh$") (("/bin/sh") (which "sh"))))) -- 2.33.0
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Sat, 04 Sep 2021 09:43:02 GMT) Full text and rfc822 format available.Message #53 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: 50077 <at> debbugs.gnu.org Cc: Andrew Tropin <andrew <at> trop.in> Subject: [PATCH v2 3/3] gnu: Add emacs-notmuch. Date: Sat, 04 Sep 2021 11:42:33 +0200
* gnu/packages/mail.scm (notmuch)[arguments]: Remove Emacs-related stuff. * gnu/packages/emacs-xyz.scm (emacs-consult-notmuch)[propagated-inputs]: Add ‘emacs-notmuch’. (emacs-counsel-notmuch)[propagated-inputs]: Use ‘emacs-notmuch’ instead of ‘notmuch’. (emacs-helm-notmuch): Likewise. (emacs-notmuch-maildir): Likewise. --- gnu/packages/emacs-xyz.scm | 8 +++--- gnu/packages/mail.scm | 52 +++++++++++++++++++++++--------------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 030809f5ac..67ba8bf523 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -8304,7 +8304,7 @@ list of candidates.") (build-system emacs-build-system) (propagated-inputs `(("emacs-consult" ,emacs-consult) - ("notmuch" ,notmuch))) + ("emacs-notmuch" ,emacs-notmuch))) (home-page "https://codeberg.org/jao/consult-notmuch") (synopsis "Search and preview Notmuch emails using Consult") (description @@ -9490,6 +9490,8 @@ queries using counsel.") `(("emacs-counsel" ,emacs-counsel) ("notmuch" ,notmuch) ("emacs-s" ,emacs-s))) + (propagated-inputs + `(("emacs-notmuch" ,emacs-notmuch))) (home-page "https://github.com/fuxialexander/counsel-notmuch") (synopsis "Search emails in Notmuch asynchronously with Ivy") (description @@ -23952,7 +23954,7 @@ workspaces with a LSP-compliant server running.") (build-system emacs-build-system) (propagated-inputs `(("emacs-helm" ,emacs-helm) - ("notmuch" ,notmuch))) + ("emacs-notmuch" ,emacs-notmuch))) (synopsis "Search emails with Emacs Notmuch and Helm") (description "This package can be used to search emails in Emacs, searching result @@ -23975,7 +23977,7 @@ real search.") "0pmikf1djkr07067nkgmdcxyn7l7ibswx6qlnai8v1v51f9h1g9q")))) (build-system emacs-build-system) (propagated-inputs - `(("notmuch" ,notmuch))) + `(("emacs-notmuch" ,emacs-notmuch))) (home-page "https://git.sr.ht/~tarsius/notmuch-maildir") (synopsis "Visualize maildirs as a tree") (description diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 173982cb12..729e47cb95 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -167,6 +167,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system guile) + #:use-module (guix build-system emacs) #:use-module (guix build-system meson) #:use-module (guix build-system perl) #:use-module (guix build-system python) @@ -1342,31 +1343,18 @@ invoking @command{notifymuch} from the post-new hook.") "1myylb19hj5nb1vriqng252vfjwwkgbi3gxj93pi2q1fzyw7w2lf")))) (build-system gnu-build-system) (arguments - `(#:modules ((guix build gnu-build-system) - ((guix build emacs-build-system) #:prefix emacs:) - (guix build utils)) - #:imported-modules (,@%gnu-build-system-modules - (guix build emacs-build-system) - (guix build emacs-utils)) - #:make-flags + `(#:make-flags (list "V=1" ; verbose test output "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-notmuch-lib.el - (lambda _ - (substitute* "emacs/notmuch-lib.el" - (("/bin/sh") (which "sh"))))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (setenv "CC" ,(cc-for-target)) (setenv "CONFIG_SHELL" (which "sh")) - - (let* ((out (assoc-ref outputs "out")) - (elisp (emacs:elpa-directory out))) + (let* ((out (assoc-ref outputs "out"))) (invoke "./configure" (string-append "--prefix=" out) - (string-append "--emacslispdir=" elisp) - (string-append "--emacsetcdir=" elisp))))) + "--without-emacs")))) (add-before 'check 'disable-failing-tests ;; FIXME: Investigate why these tests are failing, ;; and try removing this for notmuch versions > 0.31. @@ -1378,12 +1366,9 @@ invoking @command{notifymuch} from the post-new hook.") (setenv "TEST_CC" ,(cc-for-target)) ;; Patch various inline shell invocations. (substitute* (find-files "test" "\\.sh$") - (("/bin/sh") (which "sh"))))) - (add-after 'install 'make-autoloads - (assoc-ref emacs:%standard-phases 'make-autoloads))))) + (("/bin/sh") (which "sh")))))))) (native-inputs `(("bash-completion" ,bash-completion) - ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests ("pkg-config" ,pkg-config) ("python" ,python) ("python-docutils" ,python-docutils) @@ -1391,6 +1376,7 @@ invoking @command{notifymuch} from the post-new hook.") ("texinfo" ,texinfo) ;; The following are required for tests only. + ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests ("which" ,which) ("dtach" ,dtach) ("gnupg" ,gnupg) @@ -1409,6 +1395,32 @@ invoking @command{notifymuch} from the post-new hook.") ing, and tagging large collections of email messages.") (license license:gpl3+))) +(define-public emacs-notmuch + (package + (inherit notmuch) + (name "emacs-notmuch") + (build-system emacs-build-system) + (native-inputs '()) + (inputs + `(("notmuch" ,notmuch))) + (arguments + `(#:exclude (cons* "make-deps.el" "rstdoc.el" %default-exclude) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "emacs"))) + (add-after 'chdir 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((notmuch (assoc-ref inputs "notmuch"))) + (substitute* "notmuch-lib.el" + (("\"notmuch\"") + (string-append "\"" notmuch "/bin/notmuch\""))))))))) + (synopsis "Run Notmuch within Emacs") + (description + "This package provides an Emacs-based interface to the Notmuch mail +system."))) + (define-public notmuch-addrlookup-c (package (name "notmuch-addrlookup-c") -- 2.33.0
Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
:Xinglu Chen <public <at> yoctocell.xyz>
:Message #58 received at 50077-done <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr> To: Xinglu Chen <public <at> yoctocell.xyz> Cc: 50077-done <at> debbugs.gnu.org, Andrew Tropin <andrew <at> trop.in> Subject: Re: [bug#50077] [PATCH v2 0/3] Improvements to Notmuch Date: Tue, 14 Sep 2021 09:05:57 +0200
Hello, Xinglu Chen <public <at> yoctocell.xyz> writes: > Xinglu Chen (3): > gnu: notmuch: Build Texinfo manual. > gnu: notmuch: Make cross-compilable. > gnu: Add emacs-notmuch. Applied. Thank you. Regards, -- Nicolas Goaziou
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Tue, 14 Sep 2021 07:24:01 GMT) Full text and rfc822 format available.Message #61 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Andrew Tropin <andrew <at> trop.in> To: Xinglu Chen <public <at> yoctocell.xyz>, 50077 <at> debbugs.gnu.org Subject: Re: [PATCH v2 3/3] gnu: Add emacs-notmuch. Date: Tue, 14 Sep 2021 10:22:52 +0300
[Message part 1 (text/plain, inline)]
On 2021-09-04 11:42, Xinglu Chen wrote: > * gnu/packages/mail.scm (notmuch)[arguments]: Remove Emacs-related stuff. > * gnu/packages/emacs-xyz.scm (emacs-consult-notmuch)[propagated-inputs]: Add > ‘emacs-notmuch’. > (emacs-counsel-notmuch)[propagated-inputs]: Use ‘emacs-notmuch’ instead of > ‘notmuch’. > (emacs-helm-notmuch): Likewise. > (emacs-notmuch-maildir): Likewise. > --- > gnu/packages/emacs-xyz.scm | 8 +++--- > gnu/packages/mail.scm | 52 +++++++++++++++++++++++--------------- > 2 files changed, 37 insertions(+), 23 deletions(-) > > diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm > index 030809f5ac..67ba8bf523 100644 > --- a/gnu/packages/emacs-xyz.scm > +++ b/gnu/packages/emacs-xyz.scm > @@ -8304,7 +8304,7 @@ list of candidates.") > (build-system emacs-build-system) > (propagated-inputs > `(("emacs-consult" ,emacs-consult) > - ("notmuch" ,notmuch))) > + ("emacs-notmuch" ,emacs-notmuch))) > (home-page "https://codeberg.org/jao/consult-notmuch") > (synopsis "Search and preview Notmuch emails using Consult") > (description > @@ -9490,6 +9490,8 @@ queries using counsel.") > `(("emacs-counsel" ,emacs-counsel) > ("notmuch" ,notmuch) > ("emacs-s" ,emacs-s))) > + (propagated-inputs > + `(("emacs-notmuch" ,emacs-notmuch))) > (home-page "https://github.com/fuxialexander/counsel-notmuch") > (synopsis "Search emails in Notmuch asynchronously with Ivy") > (description > @@ -23952,7 +23954,7 @@ workspaces with a LSP-compliant server running.") > (build-system emacs-build-system) > (propagated-inputs > `(("emacs-helm" ,emacs-helm) > - ("notmuch" ,notmuch))) > + ("emacs-notmuch" ,emacs-notmuch))) > (synopsis "Search emails with Emacs Notmuch and Helm") > (description > "This package can be used to search emails in Emacs, searching result > @@ -23975,7 +23977,7 @@ real search.") > "0pmikf1djkr07067nkgmdcxyn7l7ibswx6qlnai8v1v51f9h1g9q")))) > (build-system emacs-build-system) > (propagated-inputs > - `(("notmuch" ,notmuch))) > + `(("emacs-notmuch" ,emacs-notmuch))) > (home-page "https://git.sr.ht/~tarsius/notmuch-maildir") > (synopsis "Visualize maildirs as a tree") > (description > diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm > index 173982cb12..729e47cb95 100644 > --- a/gnu/packages/mail.scm > +++ b/gnu/packages/mail.scm > @@ -167,6 +167,7 @@ > #:use-module (guix build-system gnu) > #:use-module (guix build-system go) > #:use-module (guix build-system guile) > + #:use-module (guix build-system emacs) > #:use-module (guix build-system meson) > #:use-module (guix build-system perl) > #:use-module (guix build-system python) > @@ -1342,31 +1343,18 @@ invoking @command{notifymuch} from the post-new hook.") > "1myylb19hj5nb1vriqng252vfjwwkgbi3gxj93pi2q1fzyw7w2lf")))) > (build-system gnu-build-system) > (arguments > - `(#:modules ((guix build gnu-build-system) > - ((guix build emacs-build-system) #:prefix emacs:) > - (guix build utils)) > - #:imported-modules (,@%gnu-build-system-modules > - (guix build emacs-build-system) > - (guix build emacs-utils)) > - #:make-flags > + `(#:make-flags > (list "V=1" ; verbose test output > "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines > #:phases (modify-phases %standard-phases > - (add-after 'unpack 'patch-notmuch-lib.el > - (lambda _ > - (substitute* "emacs/notmuch-lib.el" > - (("/bin/sh") (which "sh"))))) > (replace 'configure > (lambda* (#:key outputs #:allow-other-keys) > (setenv "CC" ,(cc-for-target)) > (setenv "CONFIG_SHELL" (which "sh")) > - > - (let* ((out (assoc-ref outputs "out")) > - (elisp (emacs:elpa-directory out))) > + (let* ((out (assoc-ref outputs "out"))) > (invoke "./configure" > (string-append "--prefix=" out) > - (string-append "--emacslispdir=" elisp) > - (string-append "--emacsetcdir=" elisp))))) > + "--without-emacs")))) > (add-before 'check 'disable-failing-tests > ;; FIXME: Investigate why these tests are failing, > ;; and try removing this for notmuch versions > 0.31. > @@ -1378,12 +1366,9 @@ invoking @command{notifymuch} from the post-new hook.") > (setenv "TEST_CC" ,(cc-for-target)) > ;; Patch various inline shell invocations. > (substitute* (find-files "test" "\\.sh$") > - (("/bin/sh") (which "sh"))))) > - (add-after 'install 'make-autoloads > - (assoc-ref emacs:%standard-phases 'make-autoloads))))) > + (("/bin/sh") (which "sh")))))))) > (native-inputs > `(("bash-completion" ,bash-completion) > - ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests > ("pkg-config" ,pkg-config) > ("python" ,python) > ("python-docutils" ,python-docutils) > @@ -1391,6 +1376,7 @@ invoking @command{notifymuch} from the post-new hook.") > ("texinfo" ,texinfo) > > ;; The following are required for tests only. > + ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests > ("which" ,which) > ("dtach" ,dtach) > ("gnupg" ,gnupg) > @@ -1409,6 +1395,32 @@ invoking @command{notifymuch} from the post-new hook.") > ing, and tagging large collections of email messages.") > (license license:gpl3+))) > > +(define-public emacs-notmuch > + (package > + (inherit notmuch) > + (name "emacs-notmuch") > + (build-system emacs-build-system) > + (native-inputs '()) > + (inputs > + `(("notmuch" ,notmuch))) > + (arguments > + `(#:exclude (cons* "make-deps.el" "rstdoc.el" %default-exclude) > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'chdir > + (lambda _ > + (chdir "emacs"))) > + (add-after 'chdir 'patch-paths > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((notmuch (assoc-ref inputs "notmuch"))) > + (substitute* "notmuch-lib.el" > + (("\"notmuch\"") > + (string-append "\"" notmuch "/bin/notmuch\""))))))))) Not sure if we need to hardcode the path to notmuch binary (some people can use guix for managing emacs packages, but not system), but I think it's a rare case and this default is reasonable and easily fixable by simple `(setq notmuch-command "notmuch")` in the cases, when notmuch itslef provided by other package manager. > + (synopsis "Run Notmuch within Emacs") > + (description > + "This package provides an Emacs-based interface to the Notmuch mail > +system."))) > + > (define-public notmuch-addrlookup-c > (package > (name "notmuch-addrlookup-c") Overall, LGTM.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Tue, 14 Sep 2021 15:31:02 GMT) Full text and rfc822 format available.Message #64 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: Andrew Tropin <andrew <at> trop.in>, 50077 <at> debbugs.gnu.org Subject: Re: [bug#50077] [PATCH v2 3/3] gnu: Add emacs-notmuch. Date: Tue, 14 Sep 2021 17:29:53 +0200
[Message part 1 (text/plain, inline)]
On Tue, Sep 14 2021, Andrew Tropin wrote: > On 2021-09-04 11:42, Xinglu Chen wrote: > >> * gnu/packages/mail.scm (notmuch)[arguments]: Remove Emacs-related stuff. >> * gnu/packages/emacs-xyz.scm (emacs-consult-notmuch)[propagated-inputs]: Add >> ‘emacs-notmuch’. >> (emacs-counsel-notmuch)[propagated-inputs]: Use ‘emacs-notmuch’ instead of >> ‘notmuch’. >> (emacs-helm-notmuch): Likewise. >> (emacs-notmuch-maildir): Likewise. >> --- >> gnu/packages/emacs-xyz.scm | 8 +++--- >> gnu/packages/mail.scm | 52 +++++++++++++++++++++++--------------- >> 2 files changed, 37 insertions(+), 23 deletions(-) >> >> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm >> index 030809f5ac..67ba8bf523 100644 >> --- a/gnu/packages/emacs-xyz.scm >> +++ b/gnu/packages/emacs-xyz.scm >> @@ -8304,7 +8304,7 @@ list of candidates.") >> (build-system emacs-build-system) >> (propagated-inputs >> `(("emacs-consult" ,emacs-consult) >> - ("notmuch" ,notmuch))) >> + ("emacs-notmuch" ,emacs-notmuch))) >> (home-page "https://codeberg.org/jao/consult-notmuch") >> (synopsis "Search and preview Notmuch emails using Consult") >> (description >> @@ -9490,6 +9490,8 @@ queries using counsel.") >> `(("emacs-counsel" ,emacs-counsel) >> ("notmuch" ,notmuch) >> ("emacs-s" ,emacs-s))) >> + (propagated-inputs >> + `(("emacs-notmuch" ,emacs-notmuch))) >> (home-page "https://github.com/fuxialexander/counsel-notmuch") >> (synopsis "Search emails in Notmuch asynchronously with Ivy") >> (description >> @@ -23952,7 +23954,7 @@ workspaces with a LSP-compliant server running.") >> (build-system emacs-build-system) >> (propagated-inputs >> `(("emacs-helm" ,emacs-helm) >> - ("notmuch" ,notmuch))) >> + ("emacs-notmuch" ,emacs-notmuch))) >> (synopsis "Search emails with Emacs Notmuch and Helm") >> (description >> "This package can be used to search emails in Emacs, searching result >> @@ -23975,7 +23977,7 @@ real search.") >> "0pmikf1djkr07067nkgmdcxyn7l7ibswx6qlnai8v1v51f9h1g9q")))) >> (build-system emacs-build-system) >> (propagated-inputs >> - `(("notmuch" ,notmuch))) >> + `(("emacs-notmuch" ,emacs-notmuch))) >> (home-page "https://git.sr.ht/~tarsius/notmuch-maildir") >> (synopsis "Visualize maildirs as a tree") >> (description >> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm >> index 173982cb12..729e47cb95 100644 >> --- a/gnu/packages/mail.scm >> +++ b/gnu/packages/mail.scm >> @@ -167,6 +167,7 @@ >> #:use-module (guix build-system gnu) >> #:use-module (guix build-system go) >> #:use-module (guix build-system guile) >> + #:use-module (guix build-system emacs) >> #:use-module (guix build-system meson) >> #:use-module (guix build-system perl) >> #:use-module (guix build-system python) >> @@ -1342,31 +1343,18 @@ invoking @command{notifymuch} from the post-new hook.") >> "1myylb19hj5nb1vriqng252vfjwwkgbi3gxj93pi2q1fzyw7w2lf")))) >> (build-system gnu-build-system) >> (arguments >> - `(#:modules ((guix build gnu-build-system) >> - ((guix build emacs-build-system) #:prefix emacs:) >> - (guix build utils)) >> - #:imported-modules (,@%gnu-build-system-modules >> - (guix build emacs-build-system) >> - (guix build emacs-utils)) >> - #:make-flags >> + `(#:make-flags >> (list "V=1" ; verbose test output >> "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines >> #:phases (modify-phases %standard-phases >> - (add-after 'unpack 'patch-notmuch-lib.el >> - (lambda _ >> - (substitute* "emacs/notmuch-lib.el" >> - (("/bin/sh") (which "sh"))))) >> (replace 'configure >> (lambda* (#:key outputs #:allow-other-keys) >> (setenv "CC" ,(cc-for-target)) >> (setenv "CONFIG_SHELL" (which "sh")) >> - >> - (let* ((out (assoc-ref outputs "out")) >> - (elisp (emacs:elpa-directory out))) >> + (let* ((out (assoc-ref outputs "out"))) >> (invoke "./configure" >> (string-append "--prefix=" out) >> - (string-append "--emacslispdir=" elisp) >> - (string-append "--emacsetcdir=" elisp))))) >> + "--without-emacs")))) >> (add-before 'check 'disable-failing-tests >> ;; FIXME: Investigate why these tests are failing, >> ;; and try removing this for notmuch versions > 0.31. >> @@ -1378,12 +1366,9 @@ invoking @command{notifymuch} from the post-new hook.") >> (setenv "TEST_CC" ,(cc-for-target)) >> ;; Patch various inline shell invocations. >> (substitute* (find-files "test" "\\.sh$") >> - (("/bin/sh") (which "sh"))))) >> - (add-after 'install 'make-autoloads >> - (assoc-ref emacs:%standard-phases 'make-autoloads))))) >> + (("/bin/sh") (which "sh")))))))) >> (native-inputs >> `(("bash-completion" ,bash-completion) >> - ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests >> ("pkg-config" ,pkg-config) >> ("python" ,python) >> ("python-docutils" ,python-docutils) >> @@ -1391,6 +1376,7 @@ invoking @command{notifymuch} from the post-new hook.") >> ("texinfo" ,texinfo) >> >> ;; The following are required for tests only. >> + ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests >> ("which" ,which) >> ("dtach" ,dtach) >> ("gnupg" ,gnupg) >> @@ -1409,6 +1395,32 @@ invoking @command{notifymuch} from the post-new hook.") >> ing, and tagging large collections of email messages.") >> (license license:gpl3+))) >> >> +(define-public emacs-notmuch >> + (package >> + (inherit notmuch) >> + (name "emacs-notmuch") >> + (build-system emacs-build-system) >> + (native-inputs '()) >> + (inputs >> + `(("notmuch" ,notmuch))) >> + (arguments >> + `(#:exclude (cons* "make-deps.el" "rstdoc.el" %default-exclude) >> + #:phases >> + (modify-phases %standard-phases >> + (add-after 'unpack 'chdir >> + (lambda _ >> + (chdir "emacs"))) >> + (add-after 'chdir 'patch-paths >> + (lambda* (#:key inputs #:allow-other-keys) >> + (let ((notmuch (assoc-ref inputs "notmuch"))) >> + (substitute* "notmuch-lib.el" >> + (("\"notmuch\"") >> + (string-append "\"" notmuch "/bin/notmuch\""))))))))) > > Not sure if we need to hardcode the path to notmuch binary (some people > can use guix for managing emacs packages, but not system), but I think > it's a rare case and this default is reasonable and easily fixable by > simple `(setq notmuch-command "notmuch")` in the cases, when notmuch > itslef provided by other package manager. Yeah, this default should work for most people, and as you said, people who haven’t installed Notmuch via Guix can just set to the ‘notmuch-command’ to the appropriate value. It’s Emacs after all... ;-) Also, since there was a consensus that Emacs packages that were included in “regular” packages should be packaged as separate ‘emacs-’ packages, I think it would be a good idea to add a paragraph about that in the manual.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Tue, 14 Sep 2021 17:39:02 GMT) Full text and rfc822 format available.Message #67 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: zimoun <zimon.toutoune <at> gmail.com> To: Xinglu Chen <public <at> yoctocell.xyz>, Andrew Tropin <andrew <at> trop.in>, 50077 <at> debbugs.gnu.org Subject: Re: [bug#50077] [PATCH v2 3/3] gnu: Add emacs-notmuch. Date: Tue, 14 Sep 2021 17:35:45 +0200
Hi, On Tue, 14 Sep 2021 at 17:29, Xinglu Chen <public <at> yoctocell.xyz> wrote: > On Tue, Sep 14 2021, Andrew Tropin wrote: >> On 2021-09-04 11:42, Xinglu Chen wrote: >> Not sure if we need to hardcode the path to notmuch binary (some people >> can use guix for managing emacs packages, but not system), but I think >> it's a rare case and this default is reasonable and easily fixable by >> simple `(setq notmuch-command "notmuch")` in the cases, when notmuch >> itslef provided by other package manager. > > Yeah, this default should work for most people, and as you said, people > who haven’t installed Notmuch via Guix can just set to the > ‘notmuch-command’ to the appropriate value. It’s Emacs after all... ;-) > > Also, since there was a consensus that Emacs packages that were included > in “regular” packages should be packaged as separate ‘emacs-’ packages, > I think it would be a good idea to add a paragraph about that in the > manual. I agree. For references, this question appears here: <http://issues.guix.gnu.org/issue/49457> <http://issues.guix.gnu.org/issue/50231> so it seems something is missing in the manual. :-) All the best, simon
guix-patches <at> gnu.org
:bug#50077
; Package guix-patches
.
(Tue, 14 Sep 2021 19:21:02 GMT) Full text and rfc822 format available.Message #70 received at 50077 <at> debbugs.gnu.org (full text, mbox):
From: Xinglu Chen <public <at> yoctocell.xyz> To: zimoun <zimon.toutoune <at> gmail.com>, Andrew Tropin <andrew <at> trop.in>, 50077 <at> debbugs.gnu.org Subject: Re: [bug#50077] [PATCH v2 3/3] gnu: Add emacs-notmuch. Date: Tue, 14 Sep 2021 21:20:31 +0200
[Message part 1 (text/plain, inline)]
On Tue, Sep 14 2021, zimoun wrote: > Hi, > > On Tue, 14 Sep 2021 at 17:29, Xinglu Chen <public <at> yoctocell.xyz> wrote: >> On Tue, Sep 14 2021, Andrew Tropin wrote: >>> On 2021-09-04 11:42, Xinglu Chen wrote: > >>> Not sure if we need to hardcode the path to notmuch binary (some people >>> can use guix for managing emacs packages, but not system), but I think >>> it's a rare case and this default is reasonable and easily fixable by >>> simple `(setq notmuch-command "notmuch")` in the cases, when notmuch >>> itslef provided by other package manager. >> >> Yeah, this default should work for most people, and as you said, people >> who haven’t installed Notmuch via Guix can just set to the >> ‘notmuch-command’ to the appropriate value. It’s Emacs after all... ;-) >> >> Also, since there was a consensus that Emacs packages that were included >> in “regular” packages should be packaged as separate ‘emacs-’ packages, >> I think it would be a good idea to add a paragraph about that in the >> manual. > > I agree. For references, this question appears here: > > <http://issues.guix.gnu.org/issue/49457> > <http://issues.guix.gnu.org/issue/50231> > > so it seems something is missing in the manual. :-) Just sent a patch for it. :-) <https://issues.guix.gnu.org/issue/50589>
[signature.asc (application/pgp-signature, inline)]
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 13 Oct 2021 11:24:08 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.