From f2311c50f7b2fde7e9b82cab04829b90f6209b1d Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Fri, 8 Jul 2022 10:22:49 -0300 Subject: fioctl: 0.25 -> 0.26 --- pkgs/tools/admin/fioctl/default.nix | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'pkgs/tools/admin/fioctl') diff --git a/pkgs/tools/admin/fioctl/default.nix b/pkgs/tools/admin/fioctl/default.nix index 8ae6c1e5a48e9..d2dcc1d4953d4 100644 --- a/pkgs/tools/admin/fioctl/default.nix +++ b/pkgs/tools/admin/fioctl/default.nix @@ -1,24 +1,40 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, fioctl }: buildGoModule rec { pname = "fioctl"; - version = "0.25"; + version = "0.26"; src = fetchFromGitHub { owner = "foundriesio"; repo = "fioctl"; rev = "v${version}"; - sha256 = "sha256-wRjSg0jOXDfzF4kZboFawVvujCmAeB9xDOGE0tGYl4g="; + sha256 = "sha256-IrbzWQEtCEG2UUkExWgs7A81RiJLXDAOrr8q4mPwcOI="; }; - vendorSha256 = "sha256-B3VL2ZHPdx9iWK++ckzz2H8zV7ESQZCw39AEffXNu+w="; + vendorSha256 = "sha256-lstUcyxDVcUtgVY5y5EGgSFZgHbchQ9izf8sCq5vTVQ="; ldflags = [ - "-s" "-w" "-X github.com/foundriesio/fioctl/subcommands/version.Commit=${src.rev}" + "-s" "-w" + "-X github.com/foundriesio/fioctl/subcommands/version.Commit=${src.rev}" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd fioctl \ + --bash <($out/bin/fioctl completion bash) \ + --fish <($out/bin/fioctl completion fish) \ + --zsh <($out/bin/fioctl completion zsh) + ''; + + passthru.tests.version = testers.testVersion { + package = fioctl; + command = "HOME=$(mktemp -d) fioctl version"; + version = "v${version}"; + }; + meta = with lib; { - description = "A simple CLI to manage your Foundries Factory "; + description = "A simple CLI to manage your Foundries Factory"; homepage = "https://github.com/foundriesio/fioctl"; license = licenses.asl20; maintainers = with maintainers; [ nixinator matthewcroughan ]; -- cgit 1.4.1