diff options
Diffstat (limited to 'pkgs/servers/nosql/influxdb2/cli.nix')
-rw-r--r-- | pkgs/servers/nosql/influxdb2/cli.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/servers/nosql/influxdb2/cli.nix b/pkgs/servers/nosql/influxdb2/cli.nix index a331c58a3dbec..f00f09a96aa13 100644 --- a/pkgs/servers/nosql/influxdb2/cli.nix +++ b/pkgs/servers/nosql/influxdb2/cli.nix @@ -1,6 +1,8 @@ { buildGoModule , fetchFromGitHub +, installShellFiles , lib +, stdenv }: let @@ -18,11 +20,19 @@ in buildGoModule { 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; |