This is similar to the way devenv works.
There you have .devenv/
directory and inside that a symlink called profile
underneath which all the required bin
, lib
, etc. live.
If you use direnv you already have a directory called .direnv
so you could create the symlink in there so it doesn’t clutter the project root.
Thanks for the tips! I should look into devenv. Does it work equally well with direnv and nix-shell
? I’ve configured direnv to put files in $XDG_CACHE_HOME
because I don’t want any more clutter in my projects, and I’ve made sure all my environments work with plain nix-shell
.
I would say so yes but if you don’t need services like MySQL or similar you probably won’t be gaining that much by switching to devenv.
I do a similar thing but put that stiff in the .direnv or .devenv directory so that when I remove the project all the cruft is gone as well.