nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

build-dotnet-module: reintroduce tmpdir fix

Open erikarvstedt opened this issue 1 year ago • 4 comments

Reintroduce the fix from #209357 which was deleted in #327651.

@corngood, was there a reason for deleting this?

erikarvstedt avatar Aug 30 '24 10:08 erikarvstedt

I didn't intentionally remove it, I just replaced all of fetch-deps with the one from dotnet VMR. Sorry about that.

corngood avatar Aug 30 '24 13:08 corngood

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?

corngood avatar Aug 30 '24 13:08 corngood

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.

erikarvstedt avatar Aug 30 '24 13:08 erikarvstedt

I think we should keep the tmpdir fix until newer Nix versions are widely used.

can we add a comment to that effect?

corngood avatar Aug 30 '24 14:08 corngood

The fix introduced here is no longer needed with newer Nix versions.

erikarvstedt avatar Feb 08 '25 10:02 erikarvstedt