File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3+ stdenv ,
34 fetchFromGitHub ,
5+ installShellFiles ,
46 nix-update-script ,
57 rustPlatform ,
68 versionCheckHook ,
@@ -20,6 +22,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
2022 useFetchCargoVendor = true ;
2123 cargoHash = "sha256-OVGaHLA/VzF8wGrWrHaKpYDcp4ZeR9mf2s5I+u5ddcs=" ;
2224
25+ nativeBuildInputs = lib . optionals ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) [
26+ installShellFiles
27+ ] ;
28+
29+ postInstall = lib . optionalString ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) ''
30+ installShellCompletion --cmd zizmor \
31+ --bash <("$out/bin/zizmor" --completions bash) \
32+ --zsh <("$out/bin/zizmor" --completions zsh) \
33+ --fish <("$out/bin/zizmor" --completions fish)
34+ '' ;
35+
2336 nativeInstallCheckInputs = [ versionCheckHook ] ;
2437
2538 doInstallCheck = true ;
You can’t perform that action at this time.
0 commit comments