Closed mightyiam closed 8 months ago
by-name could be implemented using builtins only, so perhaps it should be its own flake.
Probably not since it's tightly coupled with nixpkgs. Might as well add it to nixpkgs.lib directly?
Does this look nice? https://github.com/mightyiam/by-name
Yep. It's at a place where I could use it if I wanted. If you want to go further, add a motivation section that explains why it exists. What is it good for, and in what context? How does it compare to other solutions?
Sorry. I was under a wrong impression that flake-utils has nixpkgs as input, which affected my decision regarding where to publish the by-name implementation.
I also seem to have not properly absorbed your input:
Probably not since it's tightly coupled with nixpkgs. Might as well add it to nixpkgs.lib directly?
I'm not completely certain where I would best prefer a byName implementation to live; in nixpkgs or in flake-utils or somewhere else.
Is it really coupled with nixpkgs? It's just a simple pattern implementation.
Do you want by-name to track the implementation of nixpkgs? If yes, then might as well re-export the version that is implemented in nixpkgs.
On the other hand, flake-utils is specifically about flakes, isn't it? So, perhaps byName
is not a great fit in it.
Do you want by-name to track the implementation of nixpkgs?
Nah... it's only inspired by it. I just want it to be useful and convenient.
Would this flake-utils be a good home for a by-name function for the community? A by-name function that provides callPackaging from
*/package.nix
, similar to what was recently added to Nixpkgs.