proton-cli: don't run the built binary when cross-compiling

The completions are generated by running the binary that was just
built, which the build machine cannot do when it is not the host
platform. stdenv already disables the install check on exactly this
condition; postInstall was the one place ignoring it.

Assisted-by: pi 0.84.2 (Anthropic claude-opus-5)
This commit is contained in:
Roman
2026-08-31 22:31:33 +02:00
parent 06b225d778
commit 1bf24d8815

View File

@@ -54,7 +54,7 @@ buildGoModule (finalAttrs: {
preBuild = null;
};
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd proton-cli \
--bash <($out/bin/proton-cli completion bash) \
--fish <($out/bin/proton-cli completion fish) \