From: Andrew Tropin <andrew@trop.in>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>,
Mekeor Melire <mekeor@posteo.de>, Guix Devel <guix-devel@gnu.org>
Subject: Re: Proof of Concept: Import Emacs' use-packaged packages into Guix' manifest.scm
Date: Mon, 19 Dec 2022 14:15:08 +0400 [thread overview]
Message-ID: <87bknzzolv.fsf@trop.in> (raw)
In-Reply-To: <cf5ccd4590849576eb20d2e9e1a105ea3640d4e9.camel@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3281 bytes --]
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
>> use, because I don't need to maintain the list of emacs-packages
>> in two places. I also think that it could come pretty handy for
>> many others, at least in order to initialize their user-profile,
>> by running something like ~guix package -e '(some-magic
>> "/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
>> channel? Into the Guix Cookbook? Into Guix, if so, then probably
>> with lots of changes? Should it just stay here, in this mailing
>> 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:
--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
...)
--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#L946
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
--
Best regards,
Andrew Tropin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2022-12-19 10:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-18 1:54 Proof of Concept: Import Emacs' use-packaged packages into Guix' manifest.scm Mekeor Melire
2022-12-18 8:11 ` Liliana Marie Prikler
2022-12-19 10:15 ` Andrew Tropin [this message]
2022-12-20 9:45 ` Mekeor Melire
2022-12-20 14:56 ` Andrew Tropin
2022-12-20 9:16 ` Mekeor Melire
2022-12-20 15:06 ` Andrew Tropin
2022-12-19 10:42 ` zimoun
2022-12-28 0:51 ` Mitchell Schmeisser via Development of GNU Guix and the GNU System distribution.
2023-02-02 9:44 ` Mekeor Melire
2023-02-03 2:20 ` Mitchell Schmeisser via Development of GNU Guix and the GNU System distribution.
2023-02-03 2:31 ` Mitchell Schmeisser via Development of GNU Guix and the GNU System distribution.
[not found] <875ydxi4xn.fsf@posteo.de>
2022-12-27 18:52 ` Mitchell Schmeisser via Development of GNU Guix and the GNU System distribution.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bknzzolv.fsf@trop.in \
--to=andrew@trop.in \
--cc=guix-devel@gnu.org \
--cc=liliana.prikler@gmail.com \
--cc=mekeor@posteo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).