Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #328729 from msfjarvis/kondo-completions

kondo: install shell completion

authored by Peder Bergebakken Sundt and committed by GitHub ca208751 d1fcce91

+10 -1
+10 -1
pkgs/applications/misc/kondo/default.nix
··· 1 - { lib, rustPlatform, fetchFromGitHub }: 1 + { lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles }: 2 2 3 3 rustPlatform.buildRustPackage rec { 4 4 pname = "kondo"; ··· 12 12 }; 13 13 14 14 cargoHash = "sha256-WF4GHj/5VYrTUh1E3t29zbpSLjJ6g7RWVpLYqg9msZg="; 15 + 16 + nativeBuildInputs = [ installShellFiles ]; 17 + 18 + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 19 + installShellCompletion --cmd kondo \ 20 + --bash <($out/bin/kondo --completions bash) \ 21 + --fish <($out/bin/kondo --completions fish) \ 22 + --zsh <($out/bin/kondo --completions zsh) 23 + ''; 15 24 16 25 meta = with lib; { 17 26 description = "Save disk space by cleaning unneeded files from software projects";