Compiling Fennel with nixCats on Build #379
-
|
Is there any way to configure nvim via fennel and compile fennel on build into the nix store with nixCats? I am currently doing this via hotpot.nvim that compiles fennel and throws the result in cache. But, I think this is a bit inelegant. I was thinking of some sort of build hook or extra arg that compiles fennel and puts it in the appropriate places. My guess is that this has something to do with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
https://nixcats.org/nixCats_format.html#nixCats.flake.outputs.settings There is a setting called wrappedCfgDir. It can take a path, including a derivation, OR a function that gets the same arguments as your packageDefinitions. You packageDefinitions are also passed luaPath as an arg. You can use it to build your config directory into whatever shape you want and provide that there. HOWEVER. Something to keep in mind is, when you are using your config unwrapped, like, You can run the steps via nix when you are building your config via nix, but if you are using the impure directory, nix doesnt have it and can't do that, so you would have to build it yourself if you wanted to then test changes without rebuilding. So, basically, whatever way you are building it now, you can have nix do it via When I tried out fennel I really wanted, like, something where I could have it work without a compile anywhere at any time, regardless of if my config had a nix build step it could use or not, and I wanted to have it do bytecode caching so it doesn't then recompile every time, just the first. There wasn't really anything good for that, you always had to actually run a build, or interpret it from scratch every time. I wanted caching that does it automatically lol I made a kinda meh one https://github.com/BirdeeHub/fn_finder It works mostly, you can see it in my config Thing is, its kinda crap and needs a nix-only hack, (demonstrated in my config) to work well because I never finished it, even though it does work, so, feel free to improve it and release it as a thing if you want, otherwise, you can build fennel via nix but when you aren't using nix then you have to run a build command. |
Beta Was this translation helpful? Give feedback.
https://nixcats.org/nixCats_format.html#nixCats.flake.outputs.settings
There is a setting called wrappedCfgDir. It can take a path, including a derivation, OR a function that gets the same arguments as your packageDefinitions. You packageDefinitions are also passed luaPath as an arg.
You can use it to build your config directory into whatever shape you want and provide that there.
HOWEVER.
Something to keep in mind is, when you are using your config unwrapped, like,
wrapRc = falseand nix isn't building it for you, then it won't run those steps and you will have to do that yourself.You can run the steps via nix when you are building your config via nix, but if you are using the impure di…