numtide / devshell

Per project developer environments
https://numtide.github.io/devshell/
MIT License
1.22k stars 87 forks source link

introduce pkgsets #209

Closed zimbatm closed 1 year ago

zimbatm commented 2 years ago

Encourage composition over overlays by passing a set of attrsets.

blaggacao commented 2 years ago

I wonder: is there a blog post about pkgsets? (I immediately wonder how they differ from inputs straight - maybe they obey some inputs.x.packages.${system} contract?)

montchr commented 2 years ago

@blaggacao I may be going out on a limb here, but it sure sounds like this:

https://zimbatm.com/notes/1000-instances-of-nixpkgs

blaggacao commented 2 years ago

Definitely, but in addition it chooses to hoist the package scope of inputs, which, admittedly, is an extremely common scope in the nix community.

But I still look at it as "primus inter pares", since the utility of flakes doesn't stop with the package scope.

So the plot here is inputs vs inputs.packages.

Jonas might have additional conceptualization, but that's how far I can grasp it.

hugosenari commented 2 years ago

❔ question: same approach makes sense for lib?

zimbatm commented 2 years ago

Sorry, it took me a minute to come back to this.

The central premise is that we want to replace "nixpkgs" with "some inputs, one of them is nixpkgs" to encourage composition. And come up with a structure that works both with flakes and non-flakes projects.

Maybe a better structure would be something like the flake-parts perSystem arguments that are flake inputs but filtered by the system. But then it's more work to re-construct that shape on non-flake systems.

rummik commented 1 year ago

Sorry to bikeshed a bit over naming conventions, especially as a late-comer to this PR, but I'd like to propose using channels rather than pkgsets, since this is a convention already used by flake-utils-plus, and is likely already familiar to a number of flake users

bew commented 1 year ago

@zimbatm why was this closed :thinking: lack of interest? or maybe there is a better alternative being worked on somewhere?