uv: only generate shell completions when possible (#358982)

This commit is contained in:
Masum Reza
2024-11-27 23:48:41 +05:30
committed by GitHub
+2 -1
View File
@@ -1,5 +1,6 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
installShellFiles,
@@ -40,7 +41,7 @@ rustPlatform.buildRustPackage rec {
# Tests require python3
doCheck = false;
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
export HOME=$TMPDIR
installShellCompletion --cmd uv \
--bash <($out/bin/uv --generate-shell-completion bash) \