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 = {