From 1bf24d8815be6006ddbfb962db725f18f69d7a0a Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 31 Aug 2026 22:31:33 +0200 Subject: [PATCH] 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) --- pkgs/by-name/pr/proton-cli/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/pr/proton-cli/package.nix b/pkgs/by-name/pr/proton-cli/package.nix index 98d1c34cb576..f1306dfe8ac0 100644 --- a/pkgs/by-name/pr/proton-cli/package.nix +++ b/pkgs/by-name/pr/proton-cli/package.nix @@ -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) \