Using a dev shell in a non-nix project

Is there a recommended strategy for setting a dev shell for a project which isn’t nixified (and doesn’t want to be)?

I have been using a shell.nix which is ignored locally by .git/info/exclude, but, if I understand correctly, this won’t work if I want to use flakes, because flake.nix must be tracked by git.

Does anyone have any suggestions?

With direnv, I’ve just been using a statement like:

use flake github:rgoulter/nix-user-repository#python_3_7

I mean, using a devshell defined somewhere else.

1 Like

There was a big thread on this topic a while ago, and this seemed to be the consensus. One other trick is to use file://$(pwd), I think, which gets around the git requirement. You can also attempt ignores in .git/exclude and similar schemes.