A way to get project root inside of nix develop
shell
#8145
Labels
feature
Feature request or proposal
nix develop
shell
#8145
Is your feature request related to a problem? Please describe.
I'd like a way to know the root of the project from inside the
nix develop
shell.Describe the solution you'd like
Running
nix develop
should automatically set aFLAKE_ROOT
env var that points to the absolute path to the directory containing theflake.nix
. Ifnix develop
is run on a remote flake URL (eg:nix develop github:user/repo
) this environment can be unset.Describe alternatives you've considered
Set this env var manually in the
shellHook
, à la: https://github.com/srid/flake-rootAdditional context
cachix/git-hooks.nix#268 (review)
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: