mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
zizmor: add shell completions (#412362)
This commit is contained in:
commit
769e9c24f7
1 changed files with 13 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
installShellFiles,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
versionCheckHook,
|
versionCheckHook,
|
||||||
|
@ -20,6 +22,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
cargoHash = "sha256-OVGaHLA/VzF8wGrWrHaKpYDcp4ZeR9mf2s5I+u5ddcs=";
|
cargoHash = "sha256-OVGaHLA/VzF8wGrWrHaKpYDcp4ZeR9mf2s5I+u5ddcs=";
|
||||||
|
|
||||||
|
nativeBuildInputs = lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
|
installShellCompletion --cmd zizmor \
|
||||||
|
--bash <("$out/bin/zizmor" --completions bash) \
|
||||||
|
--zsh <("$out/bin/zizmor" --completions zsh) \
|
||||||
|
--fish <("$out/bin/zizmor" --completions fish)
|
||||||
|
'';
|
||||||
|
|
||||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue