gopls: fix build in darwin sandbox

The versionCheckHook clears the environment, so gopls fails to create
its cache directory as it defaults to a read-only dir. Pass TMPDIR to
fix.

See https://github.com/NixOS/nixpkgs/issues/473777
This commit is contained in:
Andrew Marshall
2026-02-02 20:19:44 -05:00
parent cb369ef2ef
commit b093fe1897
+1
View File
@@ -36,6 +36,7 @@ buildGoLatestModule (finalAttrs: {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckKeepEnvironment = [ "TMPDIR" ];
versionCheckProgramArg = "version";
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=gopls/(.*)" ]; };