From 38c59e60bf10e84ab2f518f99853baa9e1769e77 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 7 Jul 2022 11:54:50 -0300 Subject: [PATCH] flyctl: 0.0.346 -> 0.0.348 --- pkgs/development/web/flyctl/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix index a2ee52bdfa06..a1f346e8418b 100644 --- a/pkgs/development/web/flyctl/default.nix +++ b/pkgs/development/web/flyctl/default.nix @@ -1,17 +1,17 @@ -{ lib, buildGoModule, fetchFromGitHub, testers, flyctl }: +{ lib, buildGoModule, fetchFromGitHub, testers, flyctl, installShellFiles }: buildGoModule rec { pname = "flyctl"; - version = "0.0.346"; + version = "0.0.348"; src = fetchFromGitHub { owner = "superfly"; repo = "flyctl"; rev = "v${version}"; - sha256 = "sha256-CUv/zF323tplvyAfpTWGALFV3RKpkMmxiXx3gX8ZO3A="; + sha256 = "sha256-Z5WHmwz1ds5xQkc7QrGsUjZu0ug66XNV7KFbzhaP32I="; }; - vendorSha256 = "sha256-x2mJ1FO/a4eMHpEPLGdatUoY+Bt0RGElENJYUEsqcMU="; + vendorSha256 = "sha256-U5f2S5MoCk8PjkVYKlmVQvWb8/Q8n0J9julFz52bOec="; subPackages = [ "." ]; @@ -23,6 +23,8 @@ buildGoModule rec { "-X github.com/superfly/flyctl/internal/buildinfo.version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + preBuild = '' go generate ./... ''; @@ -35,6 +37,13 @@ buildGoModule rec { go test ./... -ldflags="-X 'github.com/superfly/flyctl/internal/buildinfo.buildDate=1970-01-01T00:00:00Z'" ''; + postInstall = '' + installShellCompletion --cmd flyctl \ + --bash <($out/bin/flyctl completion bash) \ + --fish <($out/bin/flyctl completion fish) \ + --zsh <($out/bin/flyctl completion zsh) + ''; + passthru.tests.version = testers.testVersion { package = flyctl; command = "HOME=$(mktemp -d) flyctl version";