build-dotnet-module: reintroduce tmpdir fix
Reintroduce the fix from #209357 which was deleted in #327651.
@corngood, was there a reason for deleting this?
I didn't intentionally remove it, I just replaced all of fetch-deps with the one from dotnet VMR. Sorry about that.
Inside nix-shell, TMPDIR (used by mktemp) is set to /run/user/
which is usually a tmpfs stored in RAM.
To me this sounds like nix-shell is setting it, but I believe it uses /tmp unless you have TMPDIR set when you call nix-shell. Is that right?
The current Nix version 2.18 indeed sets TMPDIR to /tmp (introduced in https://github.com/NixOS/nix/pull/10883), but all previous Nix versions set TMPDIR to /run/user/....
I think we should keep the tmpdir fix until newer Nix versions are widely used.
The error this prevents is annoying to debug and to work around.
I think we should keep the tmpdir fix until newer Nix versions are widely used.
can we add a comment to that effect?
The fix introduced here is no longer needed with newer Nix versions.