Merge pull request #201631 from kilianar/onefetch-shellcompletion

onefetch: install shell completions

authored by figsoda and committed by GitHub 46988950 b0c6f4ae

+9 -1
+9 -1
pkgs/tools/misc/onefetch/default.nix
··· 9 9 , libresolv 10 10 , Security 11 11 , git 12 + , installShellFiles 12 13 }: 13 14 14 15 rustPlatform.buildRustPackage rec { ··· 29 30 ./zstd-pkg-config.patch 30 31 ]; 31 32 32 - nativeBuildInputs = [ cmake pkg-config ]; 33 + nativeBuildInputs = [ cmake installShellFiles pkg-config ]; 33 34 34 35 buildInputs = [ zstd ] 35 36 ++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ]; ··· 43 44 git config user.email nixbld@example.com 44 45 git add . 45 46 git commit -m test 47 + ''; 48 + 49 + postInstall = '' 50 + installShellCompletion --cmd onefetch \ 51 + --bash <($out/bin/onefetch --generate bash) \ 52 + --fish <($out/bin/onefetch --generate fish) \ 53 + --zsh <($out/bin/onefetch --generate zsh) 46 54 ''; 47 55 48 56 meta = with lib; {