From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MIc4CxzIQGHUAgAAgWs5BA (envelope-from ) for ; Tue, 14 Sep 2021 18:04:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aAX1BhzIQGH/FAAA1q6Kng (envelope-from ) for ; Tue, 14 Sep 2021 16:04:44 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 98B8C19AD8 for ; Tue, 14 Sep 2021 18:04:43 +0200 (CEST) Received: from localhost ([::1]:55084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQAvE-0002Et-Kj for larch@yhetil.org; Tue, 14 Sep 2021 12:04:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQAOk-0005ar-Ro for guix-patches@gnu.org; Tue, 14 Sep 2021 11:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQAOk-0001UD-Jp for guix-patches@gnu.org; Tue, 14 Sep 2021 11:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQAOk-0002hp-D9 for guix-patches@gnu.org; Tue, 14 Sep 2021 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50077] [PATCH v2 3/3] gnu: Add emacs-notmuch. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Sep 2021 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50077 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin , 50077@debbugs.gnu.org Received: via spool by 50077-submit@debbugs.gnu.org id=B50077.163163341110337 (code B ref 50077); Tue, 14 Sep 2021 15:31:02 +0000 Received: (at 50077) by debbugs.gnu.org; 14 Sep 2021 15:30:11 +0000 Received: from localhost ([127.0.0.1]:49956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQANu-0002gc-A8 for submit@debbugs.gnu.org; Tue, 14 Sep 2021 11:30:11 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:54964 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQANq-0002eS-P7 for 50077@debbugs.gnu.org; Tue, 14 Sep 2021 11:30:09 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1631633396; bh=qSDOx9stkmr6uRNBHv5o5IJMZMSBLavW2qfMOsvrAHs=; h=From:To:Subject:In-Reply-To:References:Date; b=uS0kpi1TK90QFI8e1L6J6qNsxcX+mzCO3k3+0iKHW5ZF17llk3GhPtrsAXbUUC4/2 GFwPhRN3IvEgg7jJJdPFzxfD44BTdw9Y03zQvwvPdYC/9bPcv6uxbuGR4tO+H1+rlx eu2EdxPUm/xfLJr4aVIZu7Ou6VDCI8SHSIs/NZ4E= In-Reply-To: <878rzzmxir.fsf@trop.in> References: <878rzzmxir.fsf@trop.in> Date: Tue, 14 Sep 2021 17:29:53 +0200 Message-ID: <87lf3ztbta.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631635483; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=eiyolIbCeAWPdbhVxZH6KrgeqQaa2j4g7EjYmbxh4rk=; b=YZdBbxzOZcP2GTVZ6aI+k8xL0IIfHyx7dPwg+gaEFUtRtL+MxDqhxt9NbAT8lULkC/TbOO lB0QIYVwfL8uvYBzlPW4aFbg2gCs/Gp9B+CGsc2UqhT8N2MoOcLz08NNlpqrkFlGp1QbxV c7ws81T5Srjeu48V+mGm0fy6blDYLBMM5ZmtvTw79KUWa1374+r4FZmbLpvwIeSObrlXZV MOV6l+rDl4Biw79wKr36WyXS/V0K1x86ZTnBBq9R4BBwOmXN4bAlL/3MReQAhUo6t2gzoC KRuB3DC72O1F/M7lSOkJnhAS5Mhbzl9z1DjGR+GCg5/BchtLM1q3n2DJj9Lqzg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631635483; a=rsa-sha256; cv=none; b=D3wtPoMdd9MLvewxucOwuPg6fJ33nwaJO3V04xbcShuklc+350xlqPcgDgnJMCFQNuBv77 w1ukHQS8BhVEi4sC977FLLfwEycNGyRBjo/AF4BwttjHAV+ASPSX0q6SiIl0PcF5ebui8Z 7ovUJUZAdnExkJqrv0OLC19ROnNKermilrGfoEIeFmungmmsdvYTkL85z4bZZn1u3e1gIJ qVsP0VxHZ5lCD0gFouW4oNxP2fJUVKPJP6Mb1kWjWOTlx2lPS9jy6s28j68rJLY/uTjeqs 9hzr16g6rhC0YXtePET4jKNLONbHZ3lBQMlbAyUhaFXDnYsmW4Z1U5A5rGvGZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=uS0kpi1T; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=uS0kpi1T; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 98B8C19AD8 X-Spam-Score: -3.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: pb/aeMfFFw5l --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >> =E2=80=98emacs-notmuch=E2=80=99. >> (emacs-counsel-notmuch)[propagated-inputs]: Use =E2=80=98emacs-notmuch= =E2=80=99 instead of >> =E2=80=98notmuch=E2=80=99. >> (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 res= ult >> @@ -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=3D1" ; verbose test output >> "NOTMUCH_TEST_TIMEOUT=3D1h") ; 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=3D" out) >> - (string-append "--emacslispdir=3D" elis= p) >> - (string-append "--emacsetcdir=3D" elisp= ))))) >> + "--without-emacs")))) >> (add-before 'check 'disable-failing-tests >> ;; FIXME: Investigate why these tests are failing, >> ;; and try removing this for notmuch versions > 0.3= 1. >> @@ -1378,12 +1366,9 @@ invoking @command{notifymuch} from the post-new h= ook.") >> (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 som= e tests >> ("pkg-config" ,pkg-config) >> ("python" ,python) >> ("python-docutils" ,python-docutils) >> @@ -1391,6 +1376,7 @@ invoking @command{notifymuch} from the post-new ho= ok.") >> ("texinfo" ,texinfo) >>=20=20 >> ;; The following are required for tests only. >> + ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for som= e tests >> ("which" ,which) >> ("dtach" ,dtach) >> ("gnupg" ,gnupg) >> @@ -1409,6 +1395,32 @@ invoking @command{notifymuch} from the post-new h= ook.") >> ing, and tagging large collections of email messages.") >> (license license:gpl3+))) >>=20=20 >> +(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=E2=80=99t installed Notmuch via Guix can just set to the =E2=80=98notmuch-command=E2=80=99 to the appropriate value. It=E2=80=99s E= macs after all... ;-) Also, since there was a consensus that Emacs packages that were included in =E2=80=9Cregular=E2=80=9D packages should be packaged as separate =E2=80= =98emacs-=E2=80=99 packages, I think it would be a good idea to add a paragraph about that in the manual. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFAv/EVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5vxUQAJln8S5TpIM3sOU7jpy9pNS09Lvs kJHYMmZZo7h/n4dpRQjqtslGe+GgQKNOrjWVb9AXTYfCsU9X0CEN6zhir+LxCbxo 2LcFUxcA9oGvWzj4iGOOotxOuASivFrDWpSMWL9j9TEe5dXoapYY5aj5VKO6v9ZH EbA4nd4pqw+945z3EDusnCA/8npWifyf0jeAEVw/xM6RHHVYkZGOpVn/rBeEBvRw bUSyqnQQ1qJOUP8r6odRowuCqzOi+wBmVpOjECyr2ITvKGRCT8JzANKBqgmkQT6E QkIeVWJbuAdd1nvETt/GIcWp09a+jWvXS2oxuJ4cmBt2nYIKGeXNdksM4Ak9r/m5 LnEdGvVBCSSzi9vYINhSRyOk1j3N6h2O63Z6ckokjakXUCkL0KU5BHpLH8P74uPD +o3ORUPuBF7S+bZSgk1FTwXlev2Z0YEJlwSNUVwdu0dd56qphgqh5/lJA8QlIyP7 Z4WK84nbtWhZGyzvfd57H6L1kzyxY9Jug536r92hkHEnGpFgl7qWyjiPN43/oO3D E/a4Uh8tVdF3gKBWST7x5ssPcOCC8ATpgSUDrNSo6RRH/A7R6a5Y4RZ38p4FpSP3 dSfVzjZHHL4HRVJiwESOLoeO55nIIQZ2JD7yKwNVT07OefNTG3UbgMDQqoe6cGxL l2lhWdiNP3ZXal3X =WO/M -----END PGP SIGNATURE----- --=-=-=--