mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 04:25:14 +00:00
Merge pull request #189816 from superherointj/package-qovery-cli-add-shell-completion
qovery-cli: add version test and shell completion
This commit is contained in:
commit
11fdcc5b0b
@ -1,6 +1,9 @@
|
||||
{ lib
|
||||
, buildGoModule
|
||||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, lib
|
||||
, qovery-cli
|
||||
, testers
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@ -16,6 +19,20 @@ buildGoModule rec {
|
||||
|
||||
vendorSha256 = "sha256-4TY7/prMbvw5zVPJRoMLg7Omrxvh1HPGsdz1wqPn4uU=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd ${pname} \
|
||||
--bash <($out/bin/${pname} completion bash) \
|
||||
--fish <($out/bin/${pname} completion fish) \
|
||||
--zsh <($out/bin/${pname} completion zsh)
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = qovery-cli;
|
||||
command = "HOME=$(mktemp -d); ${pname} version";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Qovery Command Line Interface";
|
||||
homepage = "https://github.com/Qovery/qovery-cli";
|
||||
|
Loading…
Reference in New Issue
Block a user