Merge pull request #299167 from marsam/uv-completions

uv: install completions
This commit is contained in:
Mario Rodas 2024-03-26 08:33:31 -05:00 committed by GitHub
commit 3a66e16970
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,7 @@
, cmake
, darwin
, fetchFromGitHub
, installShellFiles
, openssl
, pkg-config
, rustPlatform
@ -30,6 +31,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [
cmake
installShellFiles
pkg-config
];
@ -48,6 +50,14 @@ rustPlatform.buildRustPackage rec {
OPENSSL_NO_VENDOR = true;
};
postInstall = ''
export HOME=$TMPDIR
installShellCompletion --cmd uv \
--bash <($out/bin/uv --generate-shell-completion bash) \
--fish <($out/bin/uv --generate-shell-completion fish) \
--zsh <($out/bin/uv --generate-shell-completion zsh)
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {