Conversation
flake.nix
Outdated
| rakePkgs = dir: | ||
| let | ||
| sieve = name: val: | ||
| (name != "default" && name != "bud" && name != "_sources"); | ||
|
|
||
| flattenFiltered = digga.lib.flattenTree | ||
| (nixos.lib.filterAttrs sieve (digga.lib.rakeLeaves dir)); | ||
| getBasename = name: nixos.lib.last (nixos.lib.splitString "." name); | ||
| in | ||
| nixos.lib.mapAttrs' (n: v: nixos.lib.nameValuePair (getBasename n) v) | ||
| flattenFiltered; |
There was a problem hiding this comment.
So you do think an importPackages would be suitable addition to digga? Could be, but we'd have to make and discuss the use case over there.
There was a problem hiding this comment.
Yes I do, I use the rakePkgs function exclusively to build the localPackages overlay. Which builds all packages in the ./pkgs directory so I never have to touch ./pkgs/default.nix when I add a new package. I do not know how to move it into digga and function properly.
There was a problem hiding this comment.
we could make pkgs complely default.nix-less and add add nvfetcher stuff separately.
We could also consider to teach rakeLeaves to not consider basenames starting with an underscore.
There was a problem hiding this comment.
Maybe you can have a quick look at the digga impl. With a little help, it shouldn't be too hard.
https://github.com/divnix/digga/blob/main/src/importers.nix
There was a problem hiding this comment.
I tried actually, rakePkgs is easy but I could not figure out how to make the localPackages overlay fit in there.
There was a problem hiding this comment.
I'd model it after
Lines 120 to 127 in fb3497d
returning a module that can be importsed:
{
overlays = {};
}There was a problem hiding this comment.
I think you can use rakeLeaves as is. the only (orthogonal) addition could be to skip on _ prefixes.
There was a problem hiding this comment.
In theory, you could also reuse flattenTree and derive the appropriate package name from that string, and finally callPackage on its values.
These were removed as they do not belong inside of flakes.nix.
replaced all occurrences of self/super with final/prev
|
now, I got a clearer picture what this is all about 😄 @danielphan2003 Can |
|
Yes, it can. Head over to |
|
I kind of see a It would make more sense to be able to iterate independently of the Relatively soon ( |
We could do that, would it be better to have a repo for each |
That depends probably on two things: How much design overlap there is and how much does it hurt if release cycles have to be coupled. Do you have any idea about what we could expect? |
|
I think multiples repos are best for now. I think there could also be a future where one larger repo or maybe even digga creates the overlay itself as to not clutter the users' flake inputs. |
|
https://github.com/divnix/vim-ext the project is yours 🚀 |
|
@blaggacao sorry it's taken me so long to respond, I've been quite busy lately. I've been looking at vs-ext and I'm not sure it's best to make vim-ext right now. Unless I'm mistaken the goal of vs-ext updates is to take use bud to take a vscode extension unique id, query openvsx, and then update that extensions metadata. This could be done for vim plugins however it would be a lot more work. Vim plugins aren't collectively stored in one location. You can find them on github,gitlab,(any code hosting service), vimawesome, and nvim-awesome So there would be need to create a method to query each one. If vim-ext is being described as
I would expect it to build vim plugins that have build requirements (could be node, rust, clojure, or really anything). |
|
Follow up question, how much reliant is devos on nvfetcher? I've started playing around with something similliar to nvfetcher with a few key differences
|
We made a general decision to use nvfetcher over flakes for updating srcs because it was a cleaner solution that was built for the use case. But if another solution is better, I'm sure minds can be changed :). We would have to run through a similar discussion/debate again. |
|
@Th3Whit3Wolf this time sorry for me chiming in late for the same reason as yours. Well, one day, if subflakes get really advanced, we might even want to switch something flake compatible, since there is a benefit in creating a SBOM easily from the Ideally flakes would gain the capability to make use of a library (such as
|
|
@blaggacao I have been selected for a program that will likely eat up all of my free time for the next 7 months. I do not how soon I will be able to commit to vim-ext. |
|
@Th3Whit3Wolf Thanks for letting us know. I think you already did a good start to kick off vim ergonomics with devos. Now the strategically most important task is maybe to broaden the user base and get morenusers of various ecosystems onvoarx. |
This pull request does a couple things.
./pkgs(with the exception of./pkgs/bud,./pkgs/_sourcesand./pkgs/default.nixwill be called (as incallPackage) and can useinherit (source) pname version srcso long as the name of parent folder for thedefault.nixor the name of the nix file stripped of .nix is the same name used insources.tomlsources.tomlCurrently only vimPlugins are implemented. Addresses 321.I recognize that
flake.nixis not a great place for an overlay. I was unable to find a way to make an overlay that lets you import inputs, which means defining rakeTree and flattenTree before writing what's currently in the flake. It would also have had to be used as(import ./path/filename.nix).overlay.