From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qBg2O9o5oGOVNgEAbAwnHQ (envelope-from ) for ; Mon, 19 Dec 2022 11:15:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QCk9O9o5oGP5igAA9RJhRA (envelope-from ) for ; Mon, 19 Dec 2022 11:15:54 +0100 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 5B6A33DE70 for ; Mon, 19 Dec 2022 11:15:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7DB4-0001aB-Q0; Mon, 19 Dec 2022 05:15:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7DB2-0001Z2-IZ for guix-devel@gnu.org; Mon, 19 Dec 2022 05:15:20 -0500 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7DAz-0005qn-VH for guix-devel@gnu.org; Mon, 19 Dec 2022 05:15:20 -0500 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 06BE5FF80C; Mon, 19 Dec 2022 10:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1671444913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KOAooSIAXZQvGM8p3tIVIyrWa/HdkpaiuFVxxOoihqM=; b=Qml/O6P/lW6UmpnWLfV/JxUWAS7EEwbKvxV+oisux2/8uwSJO7IMwLbz8U6O8QUeDYvOJH flyB7FjGxAYx8lxaT2mmN2HcusLJzrWrTDWsEk/YoU/JBvq1tcOytFyLhtsthMjquzSxMs 49lxxGtslnt0He+xc/jfH5pIJrrQnMTIwbYMG4nWW1qQy4kNCeUMhOOGIG/toyYDnp8Rh5 1WxeH75W3BnEFiZ2YPGSezWRNLo3V+TGBp0IYTHhA5zxDnJAsX5fV5hskieJLUwR0cCkg+ cVnLf7reoc43r1cGOoAIW+P8w3btP7OCkKsUISvLq/1O1zu9UttkwFX9YyiP8g== From: Andrew Tropin To: Liliana Marie Prikler , Mekeor Melire , Guix Devel Subject: Re: Proof of Concept: Import Emacs' use-packaged packages into Guix' manifest.scm In-Reply-To: References: <87r0wxbhm5.fsf@posteo.de> Date: Mon, 19 Dec 2022 14:15:08 +0400 Message-ID: <87bknzzolv.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:4b98:dc4:8::229; envelope-from=andrew@trop.in; helo=relay9-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b="Qml/O6P/"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671444954; a=rsa-sha256; cv=none; b=s9mTqO5EXPJZPyWoHJ1ZyeKDSBygOPjaeYMzGmKvjru6gQ5EkWlJgXvbxDYtyiAaShWJAa LwyYHSBjxTA4T4W3yioxKoCxkLN7CnOgKAVmxqEnXIijOh6rh5Yb8trB+UthDMSGqRvyQr E8SVs5FNMzOVpk10OAn15EVGiuvLMk0JRtNvIw46+SCCWyxYNr3X9VhrBP3YSokB6DuaRT rl4Fmd0+Msc8NBOl6nDZpD/eMGwqgft9hes8NqJkcR+TiEvtvjUaftAED1isru3CsZj3ah +yiZ4NTXdiX7xG8564VIDFJZ+tSDdfQQG/ipwR7grE3c+cKJjGkRl44x0nE98g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671444954; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KOAooSIAXZQvGM8p3tIVIyrWa/HdkpaiuFVxxOoihqM=; b=Y1KWu6gnBfvkkpsmCjhC0LMroN46ZDNgVm73M8gVpUuFUOKXF2bm3jQhjL2VWprXBH4KlI RuJ8czyjVIEhglxgKWyhMMzjcnpvh7DQosnjcA5acD0YF3lzr62fDAD892EzSa+NKYNdd0 BNaHDKTL0sTabpTT3Gh0pTNYwAp9f9SWg0IqSl5UcrmWRGQgLd0RZMAQfE8ezvY55qW8L9 HzSSK6MoubyeyFq/bM1q+9Qbvdn2xbKn3v5lusu/7JRDa/gv9ILmIs+BZPVcu1WRZVQvHZ Mp3SkMZmPMtw1cpIGpK76w/KxEiqa6dmZprEezVZbwNtdrNW1LWKjTZdrEbfeA== X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b="Qml/O6P/"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Spam-Score: -12.72 X-Spam-Score: -12.72 X-Migadu-Queue-Id: 5B6A33DE70 X-TUID: CkkaVNJG30to --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2022-12-18 09:11, Liliana Marie Prikler wrote: > Am Sonntag, dem 18.12.2022 um 01:54 +0000 schrieb Mekeor Melire: >> Nevertheless, for me, personally, it's pretty neat and handy to=20 >> use, because I don't need to maintain the list of emacs-packages=20 >> in two places. I also think that it could come pretty handy for=20 >> many others, at least in order to initialize their user-profile,=20 >> by running something like ~guix package -e '(some-magic=20 >> "/home/user/.emacs.d/init.el")'~. > I think we should be able to build an Emacs service in Guix Home that > can manage init.el. As a workaround, use-package should also have a > :when clause, so you can use :when (featurep 'some-package-autoloads) > if you're unsure whether 'some-package is actually installed. This > makes your init file a little more resilient and is particularly useful > with pure shells. > >> What do you think? Should this go into a separate, private=20 >> channel? Into the Guix Cookbook? Into Guix, if so, then probably=20 >> with lots of changes? Should it just stay here, in this mailing=20 >> list thread? Or do you think this is just a bad idea in general? > Given the caveats, I would rather like to see an Emacs Lisp based > script that mocks use-package and generates a manifest by evaluting > init.el. This should give you more correct results. It's not a bad > idea per se, but as-is, I think it would better be maintained in your > own channel before upstreaming. > > For upstreaming, I see two potential paths. The first one would be > integration to `guix home import', which Andrew Tropin (CC'd) could > probably tell you more on. I'm neither the author, nor the user of guix home import, however I think it could be a good place for such a functionality, but I would suggest to maintain this helper functions for a while in a personal channel, mature it and revisit this question later. To make a solution more robust and complete, you can take a look at straight.el and how it redefines use-package-ensure-function and do something similiar to generate a list of packages for guix. Another detail is that use-package accepts a symbol value for :ensure and you can write something like: =2D-8<---------------cut here---------------start------------->8--- ;; (setq use-package-always-ensure t) ; as an alternative to :ensure t (use-package vertico :ensure t ...) (use-package vertico-directory :ensure vertico ...) =2D-8<---------------cut here---------------end--------------->8--- This way you won't need a concept of "blocked" packages. One more idea: make a function which accepts file-like/origin object instead of string and generates a package with propagated-dependencies based on the content of source code provided as an argument. Personally, with my emacs config I do the things vice versa: I have elisp code in scheme files with a list of explicit dependencies: https://git.sr.ht/~abcdw/rde/tree/b57387f2/src/rde/features/emacs-xyz.scm#L= 946 Nevertheless, your idea with use-package looks good to me. > The second would be integration into `guix package' as a callable > function/command line argument, but IMHO that's less likely to pass. > > > Cheers =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmOgOawACgkQIgjSCVjB 3rD+9BAAjARW4LsGhtc9BGGPN2F2tRRRfmzCB9C69I1Ev3XqKRJJwRhhYQ02HyZ3 zJcIww4MSSrO2LM/w5XcCbmwibnQsQxLFfBK/o4b/Ge/roLkpamRFeFwizW3pf6z 7j0lrcsHMBJ4rllFoUazjEQtIX5mCx4K0Mc5ZBG5gIjMU0l+MT1bFKW1ueKC4fRp Cv1q91/FI9qg4nhUe3VIpprFGNHd69Ri9KYI+gLjcKoZ3qn3/FXlCwvLIA4DgOt4 8Mu3eREnNHbPcLgsymCbPOQJ6TZXvZ/+I4CUv0gQcxRPmWFi9eLN+boR++/1UnLb rU0gMUVKoB7rnNrjB9MXutjFZuq4VHGlM+Hgid+4oqiF3UdyMt6UnyCd5HPSL+Ko IqXpz9oLvUjnhrU30GcJfyLrfrcy9P0uc9/5mbrVUTuC2j38j1pHsWAqNza+tGuB 9F7yH2+42+NHchSkcup9vEvvbbkr2ImHysz2+XyFSaR0YyLnm8WxdXRLDqJw4RkP ygw5NwlqeQTUCL0m2XI3P4XGGvE1kq9hmQRXWvl51JqvXopo6rEkac5U6hTXLtEh IsJta1yjFO7yyjTNgMNnep9fxrcwmavAbZKmKxL8NYXbvuv40L8mVJG4SWT7UueR w5o+g0Xb1LxJK+bLWY/Gnlsw/jVfRQWP6a8YyMshBvq3edC923g= =kTiO -----END PGP SIGNATURE----- --=-=-=--