Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support embedding recipe of MELPA packages when generating the index (recipes-archive-melpa.json) #334888

Open
jian-lin opened this issue Aug 15, 2024 · 3 comments
Labels
0.kind: bug Something is broken 6.topic: emacs Text editor

Comments

@jian-lin
Copy link
Contributor

jian-lin commented Aug 15, 2024

Describe the bug

This is a potential improvement of Nixpkgs Emacs infra.

Currently, when generating index for MELPA packages, their recipes are downloaded and then hashed. The url (actually, the git commit to construct the url is stored) and hash of a recipe are stored in the index (recipes-archive-melpa.json). When building one of these packages, its recipe is downloaded again using the stored url and hash.

If we embed the recipe itself into the generated index, then there is no need to download it again at build-time.

Note that this may even decrease the index file size because the git commit and content hash of a recipe are replaced with its content and usually the content is smaller. To further decrease the index size, we can store the smaller one. But I am afraid it only brings marginal improvement.

Additional context


Add a 👍 reaction to issues you find important.

@jian-lin jian-lin added 0.kind: bug Something is broken 6.topic: emacs Text editor labels Aug 15, 2024
jian-lin added a commit to linj-fork/nixpkgs that referenced this issue Aug 15, 2024
@AndersonTorres
Copy link
Member

It would be a good idea to create a pkgs.formats.melpa-recipe generator?

@jian-lin
Copy link
Contributor Author

It would be a good idea to create a pkgs.formats.melpa-recipe generator?

What is the motivation?

When this issue is resolved, for generated packages, recipe content strings are used. For manual packages, probably only setting :files is enough.

In addition, one goal of this issue is to avoid using a derivation for recipe. However, the protocol of pkgs.formats must use a derivation.

@AndersonTorres
Copy link
Member

The motivation is that the recipe format is structured, and can be generated by using a template.
However I erroneously thought that formats was a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: emacs Text editor
Projects
None yet
Development

No branches or pull requests

2 participants