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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 141 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
ocaml-flake.url = "github:9glenda/ocaml-flake";
ocaml-flake.inputs.nixpkgs.follows = "nixpkgs";
ocaml-flake.inputs.treefmt-nix.follows = "treefmt-nix";
package-sets.url = "github:ConnorBaker/package-sets";
package-sets.inputs.nixpkgs.follows = "nixpkgs";
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
proc-flake.url = "github:srid/proc-flake";
Expand Down Expand Up @@ -264,6 +266,25 @@
'';
};

package-sets = {
flakeRef = "github:ConnorBaker/package-sets";
baseUrl = "https://github.com/ConnorBaker/package-sets";
intro = ''
Populate `packages` and `overlays` with ease.
[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?

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.

attributes, so there are some limitations to what this module can do. See the notes on the options in
[`strategies`](#opt-packageSets.strategies) for more information.
'';
};

pre-commit-hooks-nix = {
baseUrl = "https://github.com/cachix/pre-commit-hooks.nix/blob/master";
intro = ''
Expand Down