feature/treefmt - integrate treefmt-nix
attempting to continue the work from #1317.
👋 @domenkozar thanks for already taking a peek! 😮
so, i've been trying to emulate the integration of git-hooks and it's been failing. (lol. perhaps due to my noviceness with Nix.)
essentially, in integrations/git-hooks.nix, you access git-hooks via inputs. when i attempt to mimic this behavior, i'm consistently getting an error stating that inputs.treefmt-nix doesn't exist.
https://github.com/cachix/devenv/blob/68a6d54dbeb5622b8435d7f1acf9ce239a075635/src/modules/integrations/git-hooks.nix#L4-L7
Just so you know, the way this integration needs to be done has changed based on the treefmt package.
I got it working in my own library here: https://github.com/use-the-fork/snow-blower/blob/main/modules/integrations/treefmt/default.nix
I hope that helps you guys!
Is there anything I can do to help get this merged?
Is there anything I can do to help get this merged?
main thing i haven't had time to dig into is getting treefmt injected into the actual integration. essentially, inputs.treefmt-nix is "not found".
it's possible that this implementation could be applied to devenv, but ☝️ (haven't had the time to dig into it).
https://github.com/jmuchovej/forked-devenv/blob/d433fb/src/modules/integrations/treefmt.nix#L5
@yurrriq happy to add you as a contributor so you can make edits directly. i can also push the small changes i've made (resolving the comments earlier and bringing up-to-date with main).
@jmuchovej sure, I could play around next week
Anyone willing to pick this one up?
sure! i'd love to help contribute if i can. this would be a great feature to have :grin:
I implemented treefmt integration handling the optional input, @jmuchovej , here: #2238 .
Added in https://github.com/cachix/devenv/pull/2238