unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mekeor Melire <mekeor@posteo.de>
To: Andrew Tropin <andrew@trop.in>
Cc: Liliana Marie Prikler <liliana.prikler@gmail.com>, guix-devel@gnu.org
Subject: Re: Proof of Concept: Import Emacs' use-packaged packages into Guix' manifest.scm
Date: Tue, 20 Dec 2022 09:45:40 +0000	[thread overview]
Message-ID: <87a63ih062.fsf@posteo.de> (raw)
In-Reply-To: <87bknzzolv.fsf@trop.in>

2022-12-19 14:15 andrew@trop.in:

> On 2022-12-18 09:11, Liliana Marie Prikler wrote:
>
> > Am Sonntag, dem 18.12.2022 um 01:54 +0000 schrieb Mekeor Melire:

> 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.

Good idea. But separating this into a personal channel could also lead to the 
feature being forgotten.

> 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:
>
> ;; (setq use-package-always-ensure t) ; as an alternative to :ensure t
> (use-package vertico
>   :ensure t
>   ...)
>
> (use-package vertico-directory
>   :ensure vertico
>   ...)

True! The parser should consider the :ensure keyword.

> This way you won't need a concept of "blocked" packages.

It'd still be good to have such a concept in order to block packages that 
won't be used on Guix-driven system. For example:

#+begin_src elisp
(when (this-is-not-a-guix-driven-system)
  (use-package some-package-that-is-not-packaged-for-guix))

;; or equivalently

(use-package some-package-that-is-not-packaged-for-guix
  :when (this-is-not-a-guix-driven-system))
#+end_src

> 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.

You mean something like this?:

#+begin_src scheme
(define-public my-emacs
  (emacs-from-init
    :custom-emacs-package emacs-with-athena-instead-of-gtk
    :init "/home/user/.emacs.d/init.el"))
#+end_src

By the way, this won't be a "pure" package. When using 
=emacsWithPackagesFromUsePackage= feature from nix-community's emacs-overlay, 
I needed to pass an --impure flag.

> 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

Interesting!


  reply	other threads:[~2022-12-20 10:08 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
2022-12-20  9:45     ` Mekeor Melire [this message]
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=87a63ih062.fsf@posteo.de \
    --to=mekeor@posteo.de \
    --cc=andrew@trop.in \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    /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).