So Nix stuff happens automatically when we cd into repo instead of having to run nix develop a million times.
(I installed .direnv via brew install direnv, but ideally it would be installed via Nix?)
Differential D6152
[nix] Introduce `.envrc` to invoke Nix via `direnv` atul on Jan 3 2023, 12:28 PM. Authored by Tags None Referenced Files
Subscribers
Details So Nix stuff happens automatically when we cd into repo instead of having to run nix develop a million times. (I installed .direnv via brew install direnv, but ideally it would be installed via Nix?) cd comm cd comm/native
Diff Detail
Event Timeline
Comment Actions Adding @ashoat as first-pass reviewer because we're introducing nix-direnv dependency here: https://github.com/nix-community/nix-direnv Comment Actions Was just typing out response on Linear:
Figure it's like the .vscode files which are convenient for those using VS Code but don't hurt those who don't. edit: There's the brew install direnv step that I didn't include because I assume it'll be handled by Nix.. but there's also the brew install bash step that's a workaround (https://linear.app/comm/issue/ENG-2619#comment-4721ddde). Still think it's fine to land as-is for those who want to get something working for now. Comment Actions Okay sure – looks like this won't work without brew install bash and brew install direnv. Defer to @jon on the final accept. One potential concern would be if we have devs using direnv already (for whatever reason) – I could imagine this breaking their workflow until they run brew install bash and brew install direnv (which we don't want to happen). But arguably it's unlikely anybody is already using direnv? Comment Actions Sent a message in Comm Dev Team channel. I'll land after (if) @jon accepts, but happy for anyone to revert the commit if it breaks anything on their machine in any way. Comment Actions Since people have to opt-in to this and they have to have direnv pre-installed, I think this is fine for now. I'll still pursue https://linear.app/comm/issue/ENG-2621 to make it "supported" |