Skip to content

Commit

Permalink
trippy: generate shell completions (#353196)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Nov 4, 2024
2 parents 1106284 + b8afe11 commit 47fb89c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/tools/networking/trippy/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, installShellFiles
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -14,8 +16,18 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-ArSIeu3u+TUy18rzJvhq0+/qvi5xPZmtQ7rPpwaEx9g=";
};

nativeBuildInputs = [ installShellFiles ];

cargoHash = "sha256-h1NQQFjtlpQuyTz7AHuAPUe1GxR0Q2yKzow8XB9375U=";

postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
local INSTALL="$out/bin/trip"
installShellCompletion --cmd trip \
--bash <($out/bin/trip --generate bash) \
--fish <($out/bin/trip --generate fish) \
--zsh <($out/bin/trip --generate zsh)
'';

meta = with lib; {
description = "Network diagnostic tool";
homepage = "https://trippy.cli.rs";
Expand Down

0 comments on commit 47fb89c

Please sign in to comment.