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

package-sets: init #945

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ConnorBaker
Copy link

package-sets is the module I didn't realize I needed; one I've been inadvertently re-creating every time I start a new project using flakes and end up with more than one package.

The README is sparse, but the documentation for the module should be extensive.

I look forward to hearing your thoughts!

Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thoughts on the diff, as requested :)


[package-sets](https://github.com/ConnorBaker/package-sets) was born out of frustration with the manual
process of adding packages and overlays to a flake. If your flakes have more than a few packages,
dependencies between packages, or require Nixpkgs use a non-standard configuration, this module is for you.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't had much trouble making dependencies through config.packages.<name> in perSystem. How could it help me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above sentences are mostly equivalent, and maybe you could rephrase them to be less subjective and more factual?

I think it's helpful to think of the module as a function. You've already mentioned what are the outputs, but what are the inputs, roughly? That would make it easier to decide for readers whether this could be the right functionality they need.

Also helpful would be a short example that makes your concepts more tangible and lets you explain in concrete terms what the flake outputs etc will be.


## Limitations

A great deal of this module's functionality is based on `lib.packagesFromDirectoryRecursive`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you pass the output of packagesFromDirectoryRecursive as an option default?

## Limitations

A great deal of this module's functionality is based on `lib.packagesFromDirectoryRecursive`.
Unfortunately, [`flake.packages`](../options/flake-parts.html#opt-flake.packages) does not allow nested
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Unfortunately, [`flake.packages`](../options/flake-parts.html#opt-flake.packages) does not allow nested
Unfortunately, [the `packages` flake output](../options/flake-parts.html#opt-flake.packages) does not allow nested

I'll also update the option's description to say that it's not a limitation of flake-parts but of the flake format.

@roberth
Copy link
Member

roberth commented Jun 24, 2024

nitpick:
Your docs mention the term "project", which is a bit vague. That particular term often is vague anyway, but in this case I don't think you need it. You could probably describe things without it, and that would improve the accuracy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants