uv: install completions

This commit is contained in:
Mario Rodas 2024-03-25 04:20:00 +00:00
parent f7a8b88715
commit 5780402798
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; {