diff --git a/pkgs/development/tools/metal-cli/default.nix b/pkgs/development/tools/metal-cli/default.nix index a01dc7d9d28e..06bd51bd31c5 100644 --- a/pkgs/development/tools/metal-cli/default.nix +++ b/pkgs/development/tools/metal-cli/default.nix @@ -1,14 +1,14 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "metal-cli"; - version = "0.9.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "equinix"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ivO4YFFDTza20WgTGEaSGUcIEvXVtwKKVGyKWe8d9bA="; + sha256 = "sha256-+G3PBYeez1dcUELc4j6CRgxDCDWCxpOfI52QlvMVkrY="; }; vendorSha256 = "sha256-rf0EWMVvuoPUMTQKi/FnUbE2ZAs0C7XosHAzCgwB5wg="; @@ -18,6 +18,15 @@ buildGoModule rec { "-X github.com/equinix/metal-cli/cmd.Version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd metal \ + --bash <($out/bin/metal completion bash) \ + --fish <($out/bin/metal completion fish) \ + --zsh <($out/bin/metal completion zsh) + ''; + doCheck = false; doInstallCheck = true;