git.iko.soy/typeable/nixpkgs
on master help sign in
influxdb2: split CLI and server, add compat buildEnv.
commitec3133d46ec6f70b917cdc3053133e783fa40018 authorDavid Anderson <dave@natulte.net> dateThu 16 Dec 2021, 11:37 (5 years ago) parentcc6af52
4 files changed+56−23
pkgs/servers/nosql/influxdb2/cli.nix+33 pkgs/servers/nosql/influxdb2/combined.nix+12 pkgs/servers/nosql/influxdb2/default.nix+4−22 pkgs/top-level/all-packages.nix+7−1
pkgs/servers/nosql/influxdb2/cli.nixnew file+33
@@ -0,0 +1,33 @@
1+{ buildGoModule
2+, buildGoPackage
3+, fetchFromGitHub
4+, lib
5+}:
6+
7+let
8+ version = "2.2.1";
9+
10+ src = fetchFromGitHub {
11+ owner = "influxdata";
12+ repo = "influx-cli";
13+ rev = "v${version}";
14+ sha256 = "sha256-9FUchI93xLpQwtpbr5S3GfVrApHaemwbnRPIfAWmG6Y=";
15+ };
16+
17+in buildGoModule {
18+ pname = "influx-cli";
19+ version = version;
20+ src = src;
21+
22+ vendorSha256 = "sha256-Boz1G8g0fjjlflxZh4V8sd/v0bE9Oy3DpqywOpKxjd0=";
23+ subPackages = [ "cmd/influx" ];
24+
25+ ldflags = [ "-X main.commit=v${version}" "-X main.version=${version}" ];
26+
27+ meta = with lib; {
28+ description = "CLI for managing resources in InfluxDB v2";
29+ license = licenses.mit;
30+ homepage = "https://influxdata.com/";
31+ maintainers = with maintainers; [ abbradar danderson ];
32+ };
33+}
pkgs/servers/nosql/influxdb2/combined.nixnew file+12
@@ -0,0 +1,12 @@
1+{
2+ buildEnv,
3+ influxdb2-server,
4+ influxdb2-cli,
5+}:
6+buildEnv {
7+ name = "influxdb2";
8+ paths = [
9+ influxdb2-server
10+ influxdb2-cli
11+ ];
12+}
pkgs/servers/nosql/influxdb2/default.nix+4−22
@@ -1,4 +1,4 @@
1−{ buildGo117Module
1+{ buildGoModule
22, fetchFromGitHub
33, fetchurl
44, go-bindata
@@ -15,7 +15,6 @@ let
1515 version = "2.1.1";
1616 ui_version = "2.1.2";
1717 libflux_version = "0.139.0";
18− cli_version = "2.2.1";
1918
2019 src = fetchFromGitHub {
2120 owner = "influxdata";
@@ -61,21 +60,7 @@ let
6160 '';
6261 };
6362
64− cli = buildGo117Module {
65− pname = "influxdb-cli";
66− version = version;
67− src = fetchFromGitHub {
68− owner = "influxdata";
69− repo = "influx-cli";
70− rev = "v${cli_version}";
71− sha256 = "sha256-9FUchI93xLpQwtpbr5S3GfVrApHaemwbnRPIfAWmG6Y=";
72− };
73−
74− vendorSha256 = "sha256-Boz1G8g0fjjlflxZh4V8sd/v0bE9Oy3DpqywOpKxjd0=";
75− subPackages = [ "cmd/influx" ];
76− ldflags = [ "-X main.commit=v${cli_version}" "-X main.version=${cli_version}" ];
77− };
78−in buildGo117Module {
63+in buildGoModule {
7964 pname = "influxdb";
8065 version = version;
8166 src = src;
@@ -83,7 +68,7 @@ in buildGo117Module {
8368 nativeBuildInputs = [ go-bindata pkg-config ];
8469
8570 vendorSha256 = "sha256-GVLAzVJzSsC10ZWDZPP8upydwZG21E+zQ6sMKm1lCY0=";
86− subPackages = [ "cmd/influxd" ];
71+ subPackages = [ "cmd/influxd" "cmd/telemetryd" ];
8772
8873 PKG_CONFIG_PATH = "${flux}/pkgconfig";
8974 # Check that libflux and the UI are at the right version, and embed
@@ -109,9 +94,6 @@ in buildGo117Module {
10994 go generate
11095 popd
11196 '';
112− postInstall = ''
113− ln -s ${cli}/bin/influx $out/bin/influx
114− '';
11597
11698 tags = [ "assets" ];
11799
@@ -121,6 +103,6 @@ in buildGo117Module {
121103 description = "An open-source distributed time series database";
122104 license = licenses.mit;
123105 homepage = "https://influxdata.com/";
124− maintainers = with maintainers; [ danderson ];
106+ maintainers = with maintainers; [ abbradar danderson ];
125107 };
126108}
pkgs/top-level/all-packages.nix+7−1
@@ -21332,7 +21332,13 @@ with pkgs;
2133221332 };
2133321333
2133421334 influxdb = callPackage ../servers/nosql/influxdb { };
21335− influxdb2 = callPackage ../servers/nosql/influxdb2 { };
21335+ influxdb2-server = callPackage ../servers/nosql/influxdb2 {
21336+ buildGoModule = buildGo117Module;
21337+ };
21338+ influxdb2-cli = callPackage ../servers/nosql/influxdb2/cli.nix {
21339+ buildGoModule = buildGo117Module;
21340+ };
21341+ influxdb2 = callPackage ../servers/nosql/influxdb2/combined.nix { };
2133621342
2133721343 mysql57 = callPackage ../servers/sql/mysql/5.7.x.nix {
2133821344 inherit (darwin) cctools developer_cmds;