Skip to content

Commit

Permalink
influxdb3: init at 0-unstable-2025-02-17 (NixOS#383186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrumplex authored Feb 28, 2025
2 parents 8955e3d + df9b5b8 commit a245263
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions pkgs/by-name/in/influxdb3/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
lib,
rustPlatform,
fetchFromGitHub,
protobuf,
python3,
rust-jemalloc-sys-unprefixed,
rustc,
makeWrapper,
nix-update-script,
}:
rustPlatform.buildRustPackage {
pname = "influxdb3";
version = "0-unstable-2025-02-17";
src = fetchFromGitHub {
owner = "influxdata";
repo = "influxdb";
rev = "8daccb7ee8f82ffae99b25236af9645fd60e448b";
hash = "sha256-tHnLD5W3KQ1cILRHNmXAi4lvQQSBVUPxYCXmXLMLwIs=";
};

useFetchCargoVendor = true;
cargoHash = "sha256-KnmaIbK/2tRXjCpOLHcadIX8Od7lVDOwZ+FgE+yFE+Q=";

nativeBuildInputs = [
makeWrapper
protobuf
rustc.llvmPackages.lld
];

buildInputs = [
rust-jemalloc-sys-unprefixed
python3
];

env = {
GIT_HASH = "000000000000000000000000000000000000000000000000000";
GIT_HASH_SHORT = "0000000";
PYO3_PYTHON = lib.getExe python3;
};

postPatch = ''
# We provide GIT_HASH and GIT_HASH_SHORT ourselves
rm influxdb3_process/build.rs
'';

buildNoDefaultFeatures = true;
buildFeatures = [
"aws"
"gcp"
"azure"
"jemalloc_replacing_malloc"
"system-py"
];

postInstall = ''
wrapProgram $out/bin/influxdb3 \
--set PYTHONHOME ${python3} \
--suffix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
rust-jemalloc-sys-unprefixed
python3
]
}
'';

# Tests require running instance
doCheck = false;

passthru.updateScript = nix-update-script {
# Switch to "--version-regex" "v(3.*)" once the first real release tag is added
extraArgs = [ "--version=branch" ];
};

meta = {
description = "Scalable datastore for metrics, events, and real-time analytics";
homepage = "https://github.com/influxdata/influxdb";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ oddlama ];
mainProgram = "influxdb3";
};
}

0 comments on commit a245263

Please sign in to comment.