tscli: init at 0.0.7 (#413709)

This commit is contained in:
Philip Taron 2025-06-03 13:14:52 -07:00 committed by GitHub
commit 056ad24496
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,43 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "tscli";
version = "0.0.7";
src = fetchFromGitHub {
owner = "jaxxstorm";
repo = "tscli";
tag = "v${version}";
hash = "sha256-o08ynbx+Pclme+xS00jx7096D2jHnvJg28UISZayxKY=";
};
vendorHash = "sha256-+4PFwEib/8o+1mk5SOkIZkK7W1elIFToU1DI9P8s1Y8=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-X=github.com/jaxxstorm/tscli/pkg/version.Version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tscli \
--bash <($out/bin/tscli -k XXX completion bash) \
--fish <($out/bin/tscli -k XXX completion fish) \
--zsh <($out/bin/tscli -k XXX completion zsh)
'';
meta = {
description = "A CLI tool to interact with the Tailscale API";
homepage = "https://github.com/jaxxstorm/tscli";
changelog = "https://github.com/jaxxstorm/tscli/releases/tag/${src.tag}/CHANGELOG.md";
mainProgram = "tscli";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ philiptaron ];
};
}