Commit b093fe18 authored by Andrew Marshall's avatar Andrew Marshall
Browse files

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
parent cb369ef2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ buildGoLatestModule (finalAttrs: {

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckKeepEnvironment = [ "TMPDIR" ];
  versionCheckProgramArg = "version";

  passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=gopls/(.*)" ]; };