Unverified Commit a83cb9c5 authored by Bobby Rong's avatar Bobby Rong Committed by GitHub
Browse files

Merge pull request #233586 from QJoly/pv-migration-completion

pv-migrate: add shell completions
parents 580133ea 4692357c
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
  pname = "pv-migrate";
@@ -23,11 +23,22 @@ buildGoModule rec {
    "-X main.date=1970-01-01-00:00:01"
  ];

  nativeBuildInputs = [
    installShellFiles
  ];

  postInstall = ''
    installShellCompletion --cmd pv-migrate \
      --bash <($out/bin/pv-migrate completion bash) \
      --fish <($out/bin/pv-migrate completion fish) \
      --zsh <($out/bin/pv-migrate completion zsh)
  '';

  meta = with lib; {
    description = "CLI tool to easily migrate Kubernetes persistent volumes ";
    homepage = "https://github.com/utkuozdemir/pv-migrate";
    changelog = "https://github.com/utkuozdemir/pv-migrate/releases/tag/${version}";
    license = licenses.afl20;
    maintainers = [ maintainers.ivankovnatsky ];
    maintainers = with lib.maintainers; [ ivankovnatsky qjoly ];
  };
}