Open Profpatsch opened 8 years ago
Consecutive calls to nix-executable-find
do not run nix-shell
every time. The environment of each sandbox is cached and nix-executable-find
searches the cached environment again, i.e. the overhead is not that big. However, I think your solution is also fine. Let me know if you have further questions.
Yesterday I played around a little with
nix-sandbox
and found the following functions make it work (at least partially):The first two are from the docs, the
ghc
package needs the variablesghc-module-command
andghc-command
set to work. I make the buffer local, because they are different for every file, obviously. Maybe there is a better solution than buffer-local? Maybe per folder? On the other hand the nix-build overhead is not that big (I think).There’s still a bit of duplication, but what’s the general impression?