grafanactl: init at 0.0.6 (#409380)

This commit is contained in:
Aleksana 2025-05-23 20:00:34 +08:00 committed by GitHub
commit affb6b1b65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 58 additions and 0 deletions

View File

@ -26315,6 +26315,12 @@
github = "waynr";
githubId = 1441126;
};
wcarlsen = {
name = "Willi Carlsen";
email = "carlsenwilli@gmail.com";
github = "wcarlsen";
githubId = 17003032;
};
wchresta = {
email = "wchresta.nix@chrummibei.ch";
github = "wchresta";

View File

@ -0,0 +1,52 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "grafanactl";
version = "0.0.6";
src = fetchFromGitHub {
owner = "grafana";
repo = "grafanactl";
tag = "v${finalAttrs.version}";
hash = "sha256-XpXfoD2Ln3YgMl02mEqoP8BIdT9gz45hMclii28D5xQ=";
};
vendorHash = "sha256-00FLRrQknuRPwmbkIazpCxRb34IY/OCxi/zgbuzBtWw=";
ldflags = [
"-X main.version=v${finalAttrs.version}"
"-X main.commit=unknown"
"-X main.date=unknown"
];
subPackage = [ "cmd/grafanactl" ];
postInstall = ''
rm $out/bin/cmd-reference
rm $out/bin/config-reference
rm $out/bin/env-vars-reference
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Tool designed to simplify interaction with Grafana instances";
homepage = "https://github.com/grafana/grafanactl";
changelog = "https://github.com/grafana/grafanactl/tags/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wcarlsen ];
mainProgram = "grafanactl";
};
})