From a7f7e8c38fbd9658f52e9a1d997017e55568c4ce Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Mon, 11 Aug 2025 18:26:30 +0100 Subject: [PATCH] xcp: install shell completions --- pkgs/by-name/xc/xcp/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/xc/xcp/package.nix b/pkgs/by-name/xc/xcp/package.nix index 16e699597aab..0ef12c99381d 100644 --- a/pkgs/by-name/xc/xcp/package.nix +++ b/pkgs/by-name/xc/xcp/package.nix @@ -4,6 +4,7 @@ lib, acl, nix-update-script, + installShellFiles, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -19,6 +20,8 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-9cNu0cgoo0/41daJwy/uWIXa2wFhYkcPhJfA/69DVx0="; + nativeBuildInputs = [ installShellFiles ]; + checkInputs = [ acl ]; # disable tests depending on special filesystem features @@ -32,6 +35,13 @@ rustPlatform.buildRustPackage (finalAttrs: { "test_no_perms" ]; + postInstall = '' + installShellCompletion --cmd xcp \ + --bash completions/xcp.bash \ + --fish completions/xcp.fish \ + --zsh completions/xcp.zsh + ''; + passthru.updateScript = nix-update-script { }; meta = {