xcp: install shell completions (#432877)
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user