Merge pull request #191753 from danderson/danderson/influx2.4

influxdb2-server: 2.1.1 -> 2.4.0
This commit is contained in:
Christian Kögler 2022-10-01 09:29:58 +02:00 committed by GitHub
commit e64332ce46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View file

@ -5,13 +5,13 @@
}: }:
let let
version = "2.3.0"; version = "2.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "influxdata"; owner = "influxdata";
repo = "influx-cli"; repo = "influx-cli";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-i3PN0mvSzPX/hu6fF2oizfioHZ2qU2V+mRwuxT1AYWo="; sha256 = "sha256-l27BAHQtMA4kE7VEZLdOPFnSXtyWUOrcUFitaWqwvTw=";
}; };
in buildGoModule { in buildGoModule {
@ -19,7 +19,7 @@ in buildGoModule {
version = version; version = version;
src = src; src = src;
vendorSha256 = "sha256-Boz1G8g0fjjlflxZh4V8sd/v0bE9Oy3DpqywOpKxjd0="; vendorSha256 = "sha256-GnVLr9mWehgw8vs4RiOrFHVlPpPT/LP6XvCq94aJxJQ=";
subPackages = [ "cmd/influx" ]; subPackages = [ "cmd/influx" ];
ldflags = [ "-X main.commit=v${version}" "-X main.version=${version}" ]; ldflags = [ "-X main.commit=v${version}" "-X main.version=${version}" ];

View file

@ -12,20 +12,23 @@
}: }:
let let
version = "2.1.1"; version = "2.4.0";
ui_version = "2.1.2"; # Despite the name, this is not a rolling release. This is the
libflux_version = "0.139.0"; # version of the UI assets for 2.4.0, as specified in
# scripts/fetch-ui-assets.sh in the 2.4.0 tag of influxdb.
ui_version = "Master";
libflux_version = "0.179.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "influxdata"; owner = "influxdata";
repo = "influxdb"; repo = "influxdb";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-wf01DhB1ampZuWPkHUEOf3KJK4GjeOAPL3LG2+g4NGY="; sha256 = "sha256-ufJnrVWVfia2/xLRmFkauCw8ktdSJUybJkv42Gd0npg=";
}; };
ui = fetchurl { ui = fetchurl {
url = "https://github.com/influxdata/ui/releases/download/OSS-${ui_version}/build.tar.gz"; url = "https://github.com/influxdata/ui/releases/download/OSS-${ui_version}/build.tar.gz";
sha256 = "sha256-fXjShNJfKN/ZQNQHoX9/Ou4XBrXavCN+rcO+8AMc5Ug="; sha256 = "sha256-YKDp1jLyo4n+YTeMaWl8dhN4Lr3H8FXV7stJ3p3zFe8=";
}; };
flux = rustPlatform.buildRustPackage { flux = rustPlatform.buildRustPackage {
@ -35,10 +38,10 @@ let
owner = "influxdata"; owner = "influxdata";
repo = "flux"; repo = "flux";
rev = "v${libflux_version}"; rev = "v${libflux_version}";
sha256 = "sha256-cELeWZXGVLFoPYfBoBP8NeLBVFIb5o+lWyto42BLyXY="; sha256 = "sha256-xcsmvT8Ve1WbfwrdVPnJcj7RAvrk795N3C95ubbGig0=";
}; };
sourceRoot = "source/libflux"; sourceRoot = "source/libflux";
cargoSha256 = "sha256-wFgawxgqZqoPnOXJD3r5t2n7Y2bTAkBbBxeBtFEF7N4="; cargoSha256 = "sha256-+hJQFV0tWeTQDN560DzROUNpdkcZ5h2sc13akHCgqPc=";
nativeBuildInputs = [ llvmPackages.libclang ]; nativeBuildInputs = [ llvmPackages.libclang ];
buildInputs = lib.optional stdenv.isDarwin libiconv; buildInputs = lib.optional stdenv.isDarwin libiconv;
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
@ -67,7 +70,7 @@ in buildGoModule {
nativeBuildInputs = [ go-bindata pkg-config ]; nativeBuildInputs = [ go-bindata pkg-config ];
vendorSha256 = "sha256-GVLAzVJzSsC10ZWDZPP8upydwZG21E+zQ6sMKm1lCY0="; vendorSha256 = "sha256-DZsd6qPKfRbnvz0UAww+ubaeTEqQxLeil1S3SZAmmJk=";
subPackages = [ "cmd/influxd" "cmd/telemetryd" ]; subPackages = [ "cmd/influxd" "cmd/telemetryd" ];
PKG_CONFIG_PATH = "${flux}/pkgconfig"; PKG_CONFIG_PATH = "${flux}/pkgconfig";
@ -81,7 +84,7 @@ in buildGoModule {
exit 1 exit 1
fi fi
ui_ver=$(grep influxdata/ui/releases scripts/fetch-ui-assets.sh | ${perl}/bin/perl -pe 's#.*/OSS-([^/]+)/.*#$1#') ui_ver=$(egrep 'influxdata/ui/releases/.*/sha256.txt' scripts/fetch-ui-assets.sh | ${perl}/bin/perl -pe 's#.*/OSS-([^/]+)/.*#$1#')
if [ "$ui_ver" != "${ui_version}" ]; then if [ "$ui_ver" != "${ui_version}" ]; then
echo "scripts/fetch-ui-assets.sh wants UI $ui_ver, but nix derivation provides ${ui_version}" echo "scripts/fetch-ui-assets.sh wants UI $ui_ver, but nix derivation provides ${ui_version}"
exit 1 exit 1