From 7046b87dd3442bca9513d6a849d1ec2bab881c68 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 5 Jun 2024 23:39:42 +0200 Subject: [PATCH] ruff: only generate completions if program can be executed --- pkgs/development/tools/ruff/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index 89bd9348491d..6a68f3a7b820 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -64,7 +64,7 @@ rustPlatform.buildRustPackage rec { "--skip=semantic::types::infer::tests::resolve_visible_def" ]; - postInstall = '' + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd ruff \ --bash <($out/bin/ruff generate-shell-completion bash) \ --fish <($out/bin/ruff generate-shell-completion fish) \