From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YMfdLH+FLGHe1QAAgWs5BA (envelope-from ) for ; Mon, 30 Aug 2021 09:15:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sMmtKH+FLGEQcwAAB5/wlQ (envelope-from ) for ; Mon, 30 Aug 2021 07:15:11 +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 665A11F394 for ; Mon, 30 Aug 2021 09:15:10 +0200 (CEST) Received: from localhost ([::1]:45458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKbVd-0007Rw-60 for larch@yhetil.org; Mon, 30 Aug 2021 03:15:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKbVW-0007Ol-R0 for guix-patches@gnu.org; Mon, 30 Aug 2021 03:15:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKbVW-0005oq-Is for guix-patches@gnu.org; Mon, 30 Aug 2021 03:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKbVW-0008EU-ED for guix-patches@gnu.org; Mon, 30 Aug 2021 03:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 07:15: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: Xinglu Chen Cc: 50077@debbugs.gnu.org Received: via spool by 50077-submit@debbugs.gnu.org id=B50077.163030770031626 (code B ref 50077); Mon, 30 Aug 2021 07:15:02 +0000 Received: (at 50077) by debbugs.gnu.org; 30 Aug 2021 07:15:00 +0000 Received: from localhost ([127.0.0.1]:57987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKbVU-0008E1-3R for submit@debbugs.gnu.org; Mon, 30 Aug 2021 03:15:00 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:44822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKbVQ-0008Dk-JS for 50077@debbugs.gnu.org; Mon, 30 Aug 2021 03:14:58 -0400 Received: by mail-lj1-f176.google.com with SMTP id s3so24216108ljp.11 for <50077@debbugs.gnu.org>; Mon, 30 Aug 2021 00:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=WjS/SN6BkYiDdwA4deLSXY5sUMM0q91X4HYd+mL2DvM=; b=XOLxMq4UOE61B74BfV/mfymj35TbGLmHzDtKe7Iygw0j5FTj49wVpQuCUQJQqETWWv pRMJC8AVk1cWZrKY6obdhNJTHg0nALuIoWZOP5MlVCjWnr95mSF9lSElnzlGuWhQU4dI eZ/b9/EvByYoJjTJWonOqAGussYUggHMy/MrqLLs6A14gYPnGAkx1RLTBOoCehOgH4EQ p4M+qlxgeMmTnU7FLmtRtzBpbMb6YUIs3UwV0iV5TcOon9PKdgR9hJveN9PoD7l6927R ZGfaUDmFIJjbLXjga5gUMixCh7W/txzskJbRM/tjeu1yEIzk76+6mBL92tkxkUQEVAqi PdWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=WjS/SN6BkYiDdwA4deLSXY5sUMM0q91X4HYd+mL2DvM=; b=JwOEpCDLE7koqljksXXaA0ttt13qpAtpD3l/OIu7FbyGj7GRIlayzEJUOtzF9+dhLD xTj/OK0MDjwbYJcI29ff8gIFC2QWHV1e2kD/rOAJSpg0Vr14gVJt5mq3BPqF7Aw224tT lQRpwh3iAxvQvlZMGuujafYj5AIe8Z9RRoI33b18ycX5ZpM8k189xRtuvafNw5meCW3j vREtR9U37SlxMaUEWhmVYukJfUklpB4ojTikIbTKReV7CZOfXQpIVHnOmPE0K0sCceHK DxnsAzuHaPaayazlnAs+mXaZNMPjiMQ2gqlPzio/OOdOwJ7sDrTKaPCYq0crkKMgUO/D AiAw== X-Gm-Message-State: AOAM531lFniydwLJ+4T7oJX6JyCEhDMVf0uXM30F0aD7tQ0vtuVO5Tk5 rI7tj4lbO+3le5TkshP+Vr/WqRxyNdLVjA== X-Google-Smtp-Source: ABdhPJyEO3QudRrp6xP1Bm2wA35iP0fXS0G/AWa1O93sNla257j/xeyQyl+zb1dHO7ERtZ7YXCjhPA== X-Received: by 2002:a2e:8881:: with SMTP id k1mr19642389lji.443.1630307690353; Mon, 30 Aug 2021 00:14:50 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id m1sm648090lfc.144.2021.08.30.00.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 00:14:49 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87r1edvown.fsf@yoctocell.xyz> References: <87o89owoi0.fsf@trop.in> <87r1edvown.fsf@yoctocell.xyz> Date: Mon, 30 Aug 2021 10:14:46 +0300 Message-ID: <87lf4j8kux.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; 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=1630307711; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=WjS/SN6BkYiDdwA4deLSXY5sUMM0q91X4HYd+mL2DvM=; b=WpMjdxiT/x0M4YuSNDcLaTnMwzgUgdOBfybn/ZD8URLX+7EU9bCh18SAqpvtmpeMnwyHbS FbLtJMB6zCjMqNIYeeG9eplweNYRr989CGp6yfMqNzxgqDTXjrFt7qpjcUTI/hP0GzjAj6 OHpg/1qxt6RqrUWl14vttsNNO2wtcLLZlzBnWII98faD3fC/HGcHseW1W7aAytNJbvPJvL gGGmjH2JFxOJLdK4NRTzLDYnbfFs4j+iV+zZTLcEDZLJy9mDirXiCiSffKfoOTQQU/ISkz nc53blxdIBetYnw5ZtU6WhHOwxa6VhqY2HKCxfVWa466feJVFpqgatX/2XLOew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630307711; a=rsa-sha256; cv=none; b=FvtswTHQZmlPuT9deVF2zGI0KtF+AqyU/Q6n0LvVNhh2Vh0RnXnpcA6Kef8tclZvVDfV8L goBdZSG4PzM7CnV9CzETaG3gIx6GRIm/AI+Dgo6Mg3sF7+r19TQrNy6KfnN8cCYdcOgeOk SVPeq/af1xPmpEruVaF8705ej6PmUGA/YbGpDesw1X8fZgjSw5QxHw+6Kv1kQTy/dku+Tn G1MpQ7wziEujasbfjH9Lhj8/g41dKCtubVRAjDXUBKMMxvCefQoXSCFAFngzvj6skYjEi2 lK4GMtrwA0KT5ZcHClV7vV4SofyLR1j316x2B0cb+ZRbe6CjrmNJ7fexazJ4/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=XOLxMq4U; dmarc=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: -2.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=XOLxMq4U; dmarc=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: 665A11F394 X-Spam-Score: -2.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: VczmUJe1L3Vs --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-08-28 12:34, Xinglu Chen wrote: > [ Debbugs wasn=E2=80=99t Cc=E2=80=99d 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 =E2=80=98emacs=E2=80=99= output >>> [arguments]<#:modules>: Add (guix build emacs-utils). >>> <#:phases>{configure}: Use the =E2=80=98emacs=E2=80=99 output. >>> {make-autoloads}: Modify the default =E2=80=98make-autoloads=E2=80=99 p= hase to use the =E2=80=98emacs=E2=80=99 >>> 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 h= ook.") >>> (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 h= ook.") >>> (setenv "CONFIG_SHELL" (which "sh")) >>>=20=20 >>> (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=3D" out) >>> (string-append "--emacslispdir=3D" eli= sp) >>> @@ -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-bui= ld-system) >>> + store-directory->elpa= -name-version) out)) >>> + (elpa-name (package-name->name+version el= pa-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 so= me tests >>> @@ -1394,6 +1403,7 @@ invoking @command{notifymuch} from the post-new h= ook.") >>> ("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 =E2=80=9Cregular=E2=80=9D package, e.g., =E2=80=98emacs-ne= xt-pgtk=E2=80=99 adds native > compilation and pure GTK support for Emacs., =E2=80=98emacs-no-x=E2=80=99= removes X > suport for =E2=80=98emacs=E2=80=99. =E2=80=98emacs-notmuch=E2=80=99 isn= =E2=80=99t really a different version of > =E2=80=98notmuch=E2=80=99, it=E2=80=99s just =E2=80=98notmuch=E2=80=99 bu= t 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 =3D) >=20 > The =E2=80=98notmuch=E2=80=99 package in Nixpkgs also uses multiple outpu= ts[1], which > I think makes sense. > > >> >> Thank you for working on this, the changes are good and useful!) > > You are welcome! :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmEshWYACgkQIgjSCVjB 3rBY5A/9Fb5hO8de8DXW+b3JXdba0EiIvzo8FItr6Vl25iW5y6RQSBDAAwHyq7oE +ej2oC/5o0GnC5ECYsxirHP3HTtRyG7DIQaw/MX2T9CVoCMa3sL2TaYfiqCfC074 tJJCMbTQ77P9ng3ZQNtAAzf3qn/sRgmPKPcmEsX+khY5J5sqtPD7FGo0j8R+wDvz W/9vdMpkvnQP1poBvZ2MSz+AQI9+iJo8cZjeX/zl2L1eUZLE+UYlHKe/77rSRqUG x5JHmoRTOO/1Qrg8XxcF0XVVWAPVsBTP2QwEnCTm2Pz4zUxNv9zl9xUThsztoWIJ u57dMiQIOae21DmWvQPZFEfBaeXGgs7feglCoxXiLzAtqLst7cSQXpRnU24cyLWW MElOtDq4B36XFOO9/ennf2hecyOgX36plZ62694h7wwxf2ha3iKVJtOUtlYgBhq8 W8p6cnNv1S0L+JGp8fC3xd/vxLc3w2sMFhmYqq/wH7Cv/exhM1/0X2v66QocB39y prvSOWqiLQ15nEkobB7xtjtxq1jVStTTAZWQKPPd6YlYn8p1NBI8UKYCeHK7GjP1 8Y5XUldymU0BgimzgqrQC/Aw+v1Jy+f27xz4z/v9iupYHFUiz42RMk8kLB/qgk/1 EjHswkGE/hotsbkYZvhlztUtEMZuVSkzjsQ5xuDS82uZXpv22B8= =vYqN -----END PGP SIGNATURE----- --=-=-=--