Skip to content

meta.generated: set for script-created package sets#528290

Closed
ethancedwards8 wants to merge 5 commits into
NixOS:masterfrom
ethancedwards8:generated-sets
Closed

meta.generated: set for script-created package sets#528290
ethancedwards8 wants to merge 5 commits into
NixOS:masterfrom
ethancedwards8:generated-sets

Conversation

@ethancedwards8

Copy link
Copy Markdown
Member

Things done

Partially addresses: #513818

CC @Sigmanificient

Link: NixOS#513818

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
@Sigmanificient

Copy link
Copy Markdown
Member

@ethancedwards8 Hi, I've did started #513810 for this issue, but my main blocker was that i was unable to find the resource to build the package sets.

I'd like to comfirm that the generation goes well. I think it could also be an opportunity to provide some docs that truly feels missing on how to generate them from a single command

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: stdenv Standard environment labels Jun 5, 2026
@ethancedwards8

Copy link
Copy Markdown
Member Author

ah right. sorry. totally missed your PR!

@ethancedwards8

Copy link
Copy Markdown
Member Author

But yes I also had a hard time finding docs to generate many of these. Which is why I only changed the ones that are generated on eval via importing json/toml/etc.

@Sigmanificient

Copy link
Copy Markdown
Member

@ethancedwards8 I had not really advertised it either, for the above reason and that i wanted to get more feedback on the issue too 😅

@sternenseemann

Copy link
Copy Markdown
Member

I don't think this is the right approach. This sets generated based on membership in a package set, but some packages may be created manually or generated with different methods. This is, for example, the case for haskellPackages. It seems wrong to require manually created packages to set generated = false;, but only in some contexts.

Presumably, the burden should be on the generating program to output meta.generated = true.

@ethancedwards8

ethancedwards8 commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

I broadly agree with your comment.

That being said, some of these functions (for example for the typst) ecosystem explicitly state they are not meant for external consumption and don't even expose themselves. This is perfectly fine I think.

I agree that if the builder is exposed to downstream consumers it should be set in the update script. vimPlugins for example.

@infinisil

Copy link
Copy Markdown
Member

I have a fairly complete diff to do this only for actual packages that were generated. On my phone right now but I'll make a note to share it later today.

For me the motivation is NixOS/rfcs#180, because we don't want to give warnings for maintainerless leaf packages if they're generated.

@Sigmanificient

Sigmanificient commented Jun 5, 2026

Copy link
Copy Markdown
Member

@infinisil My motivation was also to help with scripting, but to filter out theses packages for treewide prs! (which i had noticed some editing generated files).

It sounds like you found a great usage of my silly variable :o

@ethancedwards8 ethancedwards8 marked this pull request as draft June 5, 2026 08:53
@Sigmanificient

Copy link
Copy Markdown
Member

Maybe we could have it set first on check-meta? And then pinging the different team so they can handle it themselves (since they will know how to do it). We could ask to also make sure to upgrade the doc in the way

@infinisil

infinisil commented Jun 5, 2026

Copy link
Copy Markdown
Member

Here's my diff: tweag@5034648

It's not complete nor entirely correct, but a start. There's a bunch of position fixups as well, which are often used to determine whether something lives in a generated file when there's no other way.

I'll probably be able to submit a PR for this this month along with the RFC#180 work

@infinisil

Copy link
Copy Markdown
Member

Fwiw, unfortunately I ended up going for something more specialised for my use case: meta.requiresMaintainers. Here's the all the additions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants