From 5780402798722696d9d2b0cb5e7fe6281f8b8c7e Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 25 Mar 2024 04:20:00 +0000 Subject: [PATCH] uv: install completions --- pkgs/by-name/uv/uv/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index 454ffb150308..025f5851ec1b 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -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; {