influxdb2: split CLI and server, add compat buildEnv.
This commit is contained in:
parent
cc6af52e9b
commit
ec3133d46e
4 changed files with 56 additions and 23 deletions
33
pkgs/servers/nosql/influxdb2/cli.nix
Normal file
33
pkgs/servers/nosql/influxdb2/cli.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ buildGoModule
|
||||
, buildGoPackage
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "influxdata";
|
||||
repo = "influx-cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-9FUchI93xLpQwtpbr5S3GfVrApHaemwbnRPIfAWmG6Y=";
|
||||
};
|
||||
|
||||
in buildGoModule {
|
||||
pname = "influx-cli";
|
||||
version = version;
|
||||
src = src;
|
||||
|
||||
vendorSha256 = "sha256-Boz1G8g0fjjlflxZh4V8sd/v0bE9Oy3DpqywOpKxjd0=";
|
||||
subPackages = [ "cmd/influx" ];
|
||||
|
||||
ldflags = [ "-X main.commit=v${version}" "-X main.version=${version}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI for managing resources in InfluxDB v2";
|
||||
license = licenses.mit;
|
||||
homepage = "https://influxdata.com/";
|
||||
maintainers = with maintainers; [ abbradar danderson ];
|
||||
};
|
||||
}
|
12
pkgs/servers/nosql/influxdb2/combined.nix
Normal file
12
pkgs/servers/nosql/influxdb2/combined.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
buildEnv,
|
||||
influxdb2-server,
|
||||
influxdb2-cli,
|
||||
}:
|
||||
buildEnv {
|
||||
name = "influxdb2";
|
||||
paths = [
|
||||
influxdb2-server
|
||||
influxdb2-cli
|
||||
];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ buildGo117Module
|
||||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, go-bindata
|
||||
|
@ -15,7 +15,6 @@ let
|
|||
version = "2.1.1";
|
||||
ui_version = "2.1.2";
|
||||
libflux_version = "0.139.0";
|
||||
cli_version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "influxdata";
|
||||
|
@ -61,21 +60,7 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
cli = buildGo117Module {
|
||||
pname = "influxdb-cli";
|
||||
version = version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "influxdata";
|
||||
repo = "influx-cli";
|
||||
rev = "v${cli_version}";
|
||||
sha256 = "sha256-9FUchI93xLpQwtpbr5S3GfVrApHaemwbnRPIfAWmG6Y=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-Boz1G8g0fjjlflxZh4V8sd/v0bE9Oy3DpqywOpKxjd0=";
|
||||
subPackages = [ "cmd/influx" ];
|
||||
ldflags = [ "-X main.commit=v${cli_version}" "-X main.version=${cli_version}" ];
|
||||
};
|
||||
in buildGo117Module {
|
||||
in buildGoModule {
|
||||
pname = "influxdb";
|
||||
version = version;
|
||||
src = src;
|
||||
|
@ -83,7 +68,7 @@ in buildGo117Module {
|
|||
nativeBuildInputs = [ go-bindata pkg-config ];
|
||||
|
||||
vendorSha256 = "sha256-GVLAzVJzSsC10ZWDZPP8upydwZG21E+zQ6sMKm1lCY0=";
|
||||
subPackages = [ "cmd/influxd" ];
|
||||
subPackages = [ "cmd/influxd" "cmd/telemetryd" ];
|
||||
|
||||
PKG_CONFIG_PATH = "${flux}/pkgconfig";
|
||||
# Check that libflux and the UI are at the right version, and embed
|
||||
|
@ -109,9 +94,6 @@ in buildGo117Module {
|
|||
go generate
|
||||
popd
|
||||
'';
|
||||
postInstall = ''
|
||||
ln -s ${cli}/bin/influx $out/bin/influx
|
||||
'';
|
||||
|
||||
tags = [ "assets" ];
|
||||
|
||||
|
@ -121,6 +103,6 @@ in buildGo117Module {
|
|||
description = "An open-source distributed time series database";
|
||||
license = licenses.mit;
|
||||
homepage = "https://influxdata.com/";
|
||||
maintainers = with maintainers; [ danderson ];
|
||||
maintainers = with maintainers; [ abbradar danderson ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21332,7 +21332,13 @@ with pkgs;
|
|||
};
|
||||
|
||||
influxdb = callPackage ../servers/nosql/influxdb { };
|
||||
influxdb2 = callPackage ../servers/nosql/influxdb2 { };
|
||||
influxdb2-server = callPackage ../servers/nosql/influxdb2 {
|
||||
buildGoModule = buildGo117Module;
|
||||
};
|
||||
influxdb2-cli = callPackage ../servers/nosql/influxdb2/cli.nix {
|
||||
buildGoModule = buildGo117Module;
|
||||
};
|
||||
influxdb2 = callPackage ../servers/nosql/influxdb2/combined.nix { };
|
||||
|
||||
mysql57 = callPackage ../servers/sql/mysql/5.7.x.nix {
|
||||
inherit (darwin) cctools developer_cmds;
|
||||
|
|
Loading…
Reference in a new issue