blob: f00f09a96aa13eae4eb7afceff04dfc3cafe2b91 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
, stdenv
}:
let
version = "2.7.5";
src = fetchFromGitHub {
owner = "influxdata";
repo = "influx-cli";
rev = "v${version}";
sha256 = "sha256-0Gyoy9T5pA+40k8kKybWBMtOfpKZxw3Vvp4ZB4ptcJs=";
};
in buildGoModule {
pname = "influx-cli";
version = version;
inherit src;
nativeBuildInputs = [ installShellFiles ];
vendorHash = "sha256-Ov0TPoMm0qi7kkWUUni677sCP1LwkT9+n3KHcAlQkDA=";
subPackages = [ "cmd/influx" ];
ldflags = [ "-X main.commit=v${version}" "-X main.version=${version}" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd influx \
--bash <($out/bin/influx completion bash) \
--zsh <($out/bin/influx completion zsh)
'';
meta = with lib; {
description = "CLI for managing resources in InfluxDB v2";
license = licenses.mit;
homepage = "https://influxdata.com/";
maintainers = with maintainers; [ abbradar ];
mainProgram = "influx";
};
}
|