[Nix] Cache PATH between nix develop invocations
Summary:
For certain environments such as XCode, it would be nice to be able
to pull in the correct version of tools needed for building native
dependencies.
Have nix write the PATH to a file, so we can source it later.
https://linear.app/comm/issue/ENG-1950
Test Plan:
# trigger `nix develop` nix develop --command true cat ~/.cache/comm/path # should show `export PATH=...` source ~/.cache/comm/path protoc --version # should be 3.15.8
Reviewers: atul, varun, abosh, O1 Nix
Reviewed By: atul, O1 Nix
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D5319