Skip to content

Commit affb6b1

Browse files
authored
grafanactl: init at 0.0.6 (#409380)
2 parents f45b7fd + 9829c00 commit affb6b1

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

maintainers/maintainer-list.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26315,6 +26315,12 @@
2631526315
github = "waynr";
2631626316
githubId = 1441126;
2631726317
};
26318+
wcarlsen = {
26319+
name = "Willi Carlsen";
26320+
email = "[email protected]";
26321+
github = "wcarlsen";
26322+
githubId = 17003032;
26323+
};
2631826324
wchresta = {
2631926325
email = "[email protected]";
2632026326
github = "wchresta";
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
versionCheckHook,
6+
nix-update-script,
7+
}:
8+
9+
buildGoModule (finalAttrs: {
10+
pname = "grafanactl";
11+
version = "0.0.6";
12+
13+
src = fetchFromGitHub {
14+
owner = "grafana";
15+
repo = "grafanactl";
16+
tag = "v${finalAttrs.version}";
17+
hash = "sha256-XpXfoD2Ln3YgMl02mEqoP8BIdT9gz45hMclii28D5xQ=";
18+
};
19+
20+
vendorHash = "sha256-00FLRrQknuRPwmbkIazpCxRb34IY/OCxi/zgbuzBtWw=";
21+
22+
ldflags = [
23+
"-X main.version=v${finalAttrs.version}"
24+
"-X main.commit=unknown"
25+
"-X main.date=unknown"
26+
];
27+
28+
subPackage = [ "cmd/grafanactl" ];
29+
30+
postInstall = ''
31+
rm $out/bin/cmd-reference
32+
rm $out/bin/config-reference
33+
rm $out/bin/env-vars-reference
34+
'';
35+
36+
doInstallCheck = true;
37+
nativeInstallCheckInputs = [
38+
versionCheckHook
39+
];
40+
versionCheckProgramArg = "--version";
41+
42+
passthru.updateScript = nix-update-script { };
43+
44+
meta = {
45+
description = "Tool designed to simplify interaction with Grafana instances";
46+
homepage = "https://github.com/grafana/grafanactl";
47+
changelog = "https://github.com/grafana/grafanactl/tags/v${finalAttrs.version}";
48+
license = lib.licenses.asl20;
49+
maintainers = with lib.maintainers; [ wcarlsen ];
50+
mainProgram = "grafanactl";
51+
};
52+
})

0 commit comments

Comments
 (0)