push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
{
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 = [ ];
mainProgram = "influx";
};
}

View File

@@ -0,0 +1,12 @@
{
buildEnv,
influxdb2-server,
influxdb2-cli,
}:
buildEnv {
name = "influxdb2";
paths = [
influxdb2-server
influxdb2-cli
];
}

View File

@@ -0,0 +1,143 @@
{
buildGoModule,
fetchFromGitHub,
fetchurl,
fetchpatch,
go-bindata,
lib,
perl,
pkg-config,
rustPlatform,
stdenv,
libiconv,
nixosTests,
}:
let
version = "2.7.12";
ui_version = "OSS-v2.7.12";
libflux_version = "0.196.1";
src = fetchFromGitHub {
owner = "influxdata";
repo = "influxdb";
rev = "v${version}";
hash = "sha256-FwvcKxCozMqJulDDCFDgp7MYJwMq/9XZ6g2q2lIgFc0=";
};
ui = fetchurl {
url = "https://github.com/influxdata/ui/releases/download/${ui_version}/build.tar.gz";
hash = "sha256-aC+GYMaxYKkY9GMaeRx22hQ3xi3kfWpaTLC9ajqOaAA=";
};
flux = rustPlatform.buildRustPackage {
pname = "libflux";
version = libflux_version;
src = fetchFromGitHub {
owner = "influxdata";
repo = "flux";
rev = "v${libflux_version}";
hash = "sha256-935aN2SxfNZvpG90rXuqZ2OTpSGLgiBDbZsBoG0WUvU=";
};
patches = [
# https://github.com/influxdata/flux/pull/5542
./fix-unsigned-char.patch
];
# Don't fail on warnings
postPatch = ''
substituteInPlace flux/Cargo.toml \
--replace-fail 'default = ["strict", ' 'default = ['
substituteInPlace flux-core/Cargo.toml \
--replace-fail 'default = ["strict"]' 'default = []'
'';
sourceRoot = "${src.name}/libflux";
cargoHash = "sha256-A6j/lb47Ob+Po8r1yvqBXDVP0Hf7cNz8WFZqiVUJj+Y=";
nativeBuildInputs = [ rustPlatform.bindgenHook ];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
pkgcfg = ''
Name: flux
Version: ${libflux_version}
Description: Library for the InfluxData Flux engine
Cflags: -I/out/include
Libs: -L/out/lib -lflux -lpthread
'';
passAsFile = [ "pkgcfg" ];
postInstall = ''
mkdir -p $out/include $out/pkgconfig
cp -r $NIX_BUILD_TOP/source/libflux/include/influxdata $out/include
substitute $pkgcfgPath $out/pkgconfig/flux.pc \
--replace-fail /out $out
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -id $out/lib/libflux.dylib $out/lib/libflux.dylib
'';
};
in
buildGoModule {
pname = "influxdb";
version = version;
inherit src;
nativeBuildInputs = [
go-bindata
pkg-config
perl
];
vendorHash = "sha256-B4w8+UaewujKVr98MFhRh2c6UMOdB+TE/mOT+cy2pHk=";
subPackages = [
"cmd/influxd"
"cmd/telemetryd"
];
PKG_CONFIG_PATH = "${flux}/pkgconfig";
postPatch = ''
# use go-bindata from environment
substituteInPlace static/static.go \
--replace-fail 'go run github.com/kevinburke/go-bindata/' ""
'';
# Check that libflux and the UI are at the right version, and embed
# the UI assets into the Go source tree.
preBuild = ''
(
flux_ver=$(grep github.com/influxdata/flux go.mod | awk '{print $2}')
if [ "$flux_ver" != "v${libflux_version}" ]; then
echo "go.mod wants libflux $flux_ver, but nix derivation provides ${libflux_version}"
exit 1
fi
ui_ver=$(egrep 'UI_RELEASE=".*"' scripts/fetch-ui-assets.sh | cut -d'"' -f2)
if [ "$ui_ver" != "${ui_version}" ]; then
echo "scripts/fetch-ui-assets.sh wants UI $ui_ver, but nix derivation provides ${ui_version}"
exit 1
fi
)
mkdir -p static/data
tar -xzf ${ui} -C static/data
pushd static
go generate
popd
'';
tags = [ "assets" ];
ldflags = [
"-X main.commit=v${version}"
"-X main.version=${version}"
];
passthru.tests = {
inherit (nixosTests) influxdb2;
};
meta = with lib; {
description = "Open-source distributed time series database";
license = licenses.mit;
homepage = "https://influxdata.com/";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/flux/src/cffi.rs b/flux/src/cffi.rs
index ba18e3d5..0c1badf8 100644
--- a/flux/src/cffi.rs
+++ b/flux/src/cffi.rs
@@ -1149,7 +1149,7 @@ from(bucket: v.bucket)
fn parse_with_invalid_utf8() {
let cfname = CString::new("foo.flux").unwrap();
let cfname_ptr: *const c_char = cfname.as_ptr();
- let v: Vec<c_char> = vec![-61, 0];
+ let v: Vec<c_char> = vec![-61i8 as c_char, 0];
let csrc: *const c_char = &v[0];
// Safety: both pointers are valid
let pkg = unsafe { flux_parse(cfname_ptr, csrc) };

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "influxdb2-provision";
version = "1.0.0";
src = fetchFromGitHub {
owner = "oddlama";
repo = "influxdb2-provision";
rev = "v${version}";
hash = "sha256-kgpUtXmwy9buupNzQj/6AIeN8XG2x0XjIckK3WIFC+I=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
python3Packages.python
python3Packages.influxdb-client
];
installPhase = ''
install -Dm0555 influxdb2-provision.py $out/bin/influxdb2-provision
wrapProgram $out/bin/influxdb2-provision --prefix PYTHONPATH : "$PYTHONPATH"
'';
meta = with lib; {
description = "Small utility to help provisioning influxdb2";
homepage = "https://github.com/oddlama/influxdb2-provision";
license = licenses.mit;
maintainers = with maintainers; [ oddlama ];
mainProgram = "influxdb2-provision";
};
}

View File

@@ -0,0 +1,27 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "influxdb2-token-manipulator";
version = "1.0.0";
src = fetchFromGitHub {
owner = "oddlama";
repo = "influxdb2-token-manipulator";
rev = "v${version}";
hash = "sha256-9glz+TdqvGJgSsbLm4J/fn7kzMC75z74/jxZrEZiooc=";
};
vendorHash = "sha256-zBZk7JbNILX18g9+2ukiESnFtnIVWhdN/J/MBhIITh8=";
meta = with lib; {
description = "Utility program to manipulate influxdb api tokens for declarative setups";
homepage = "https://github.com/oddlama/influxdb2-token-manipulator";
license = licenses.mit;
maintainers = with maintainers; [ oddlama ];
mainProgram = "influxdb2-token-manipulator";
};
}