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 , libresolv 10 , Security 11 , git 12 }: 13 14 rustPlatform.buildRustPackage rec { ··· 29 ./zstd-pkg-config.patch 30 ]; 31 32 - nativeBuildInputs = [ cmake pkg-config ]; 33 34 buildInputs = [ zstd ] 35 ++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ]; ··· 43 git config user.email nixbld@example.com 44 git add . 45 git commit -m test 46 ''; 47 48 meta = with lib; {
··· 9 , libresolv 10 , Security 11 , git 12 + , installShellFiles 13 }: 14 15 rustPlatform.buildRustPackage rec { ··· 30 ./zstd-pkg-config.patch 31 ]; 32 33 + nativeBuildInputs = [ cmake installShellFiles pkg-config ]; 34 35 buildInputs = [ zstd ] 36 ++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ]; ··· 44 git config user.email nixbld@example.com 45 git add . 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) 54 ''; 55 56 meta = with lib; {