-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hey there:)
So, in my projects' developments, I use Direnv (.envrc) and a Nix flake setup. Direnv watches the flake.{nix,lock} files which change pretty often through out my development, and also when I switch branches etc. Whenever the modification time of flake.{nix,lock} changes, it triggers a Nix evaluation of the devShell attribute, and this can take time.
Sometimes, when I perform a big rebase, in which easily cherry-picks a commit that modified flake.{nix,lock} ('easily' means without merge conflicts), there is no point in Nix evaluating again the devShell.
I was wondering, do you think git-warp-time could be utilized to spare that evaluation via Git Hooks?
Disclaimer: I haven't tried to sketch such a hook myself, and it is not super critical for me (I can live with the now slow evaluation in the rare cases in which I rebase). Also, I imagine it may be very simple to setup this hook, but I want to know what would you think of the idea first, and perhaps you'd like to document that usage in the README :).