-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Issue
I wanted to add a feature to the git.hooks module to allow specifying a path to a hook. I got all the logic wired in and working, but the issue is that I have to specify a full path 😞
nix doesn't seem to have the ability to convert a string with a relative path to a full path, and since toml doesn't have a native notion of a path, I'm kinda stuck. builtins.toPath
is depricated and doesn't really do anything.
The only work around I can think of is if we define a variable somewhere containing the current devshell.toml's path. Then I can specify a path relative to the location of the devshell.toml to the git.hook source file. I'm sure this will come in handy for similar reasons in other modules.
I guess the alternative would be to leave it as a nix only option, but setting from toml would be ideal.
Context
my devshell.toml is not at the root of the project, otherwise I probably would have thought to use DEVSHELL_ROOT