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
118 lines
2.7 KiB
Nix
118 lines
2.7 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
protobuf,
|
|
bzip2,
|
|
oniguruma,
|
|
sqlite,
|
|
xz,
|
|
zlib,
|
|
zstd,
|
|
buildNpmPackage,
|
|
gitUpdater,
|
|
}:
|
|
|
|
let
|
|
version = "0.14.7";
|
|
src = fetchFromGitHub {
|
|
owner = "openobserve";
|
|
repo = "openobserve";
|
|
tag = "v${version}";
|
|
hash = "sha256-+YcVTn/jcEbaqTycMCYn6B0z2HsvgrCY1gHnkRajwSs=";
|
|
};
|
|
web = buildNpmPackage {
|
|
inherit src version;
|
|
pname = "openobserve-ui";
|
|
|
|
sourceRoot = "${src.name}/web";
|
|
|
|
npmDepsHash = "sha256-1MUmAWkeYUEL6WZGq1Jg5W2uKa2xj0oZbGlIbvZWT1E=";
|
|
|
|
preBuild = ''
|
|
# Patch vite config to not open the browser to visualize plugin composition
|
|
substituteInPlace vite.config.ts \
|
|
--replace "open: true" "open: false";
|
|
'';
|
|
|
|
env = {
|
|
NODE_OPTIONS = "--max-old-space-size=8192";
|
|
# cypress tries to download binaries otherwise
|
|
CYPRESS_INSTALL_BINARY = 0;
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/share
|
|
mv dist $out/share/openobserve-ui
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "openobserve";
|
|
inherit version src;
|
|
|
|
patches = [
|
|
# prevent using git to determine version info during build time
|
|
./build.rs.patch
|
|
];
|
|
|
|
preBuild = ''
|
|
cp -r ${web}/share/openobserve-ui web/dist
|
|
'';
|
|
|
|
cargoHash = "sha256-vfc6B+Uc8RXQD8vGC1yV9w5YAefkYJMpCH2frqjrSWk=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
protobuf
|
|
];
|
|
|
|
buildInputs = [
|
|
bzip2
|
|
oniguruma
|
|
sqlite
|
|
xz
|
|
zlib
|
|
zstd
|
|
];
|
|
|
|
env = {
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
|
|
RUSTC_BOOTSTRAP = 1; # uses experimental features
|
|
|
|
# the patched build.rs file sets these variables
|
|
GIT_VERSION = src.tag;
|
|
GIT_COMMIT_HASH = "builtByNix";
|
|
GIT_BUILD_DATE = "1970-01-01T00:00:00Z";
|
|
};
|
|
|
|
# requires network access or filesystem mutations
|
|
checkFlags = [
|
|
"--skip=handler::http::router::tests::test_get_proxy_routes"
|
|
"--skip=tests::e2e_test"
|
|
# test_export_operator unit test panics when run on the 0.14.7 release
|
|
# see this issue for more details : https://github.com/NixOS/nixpkgs/issues/447106
|
|
"--skip=tests::test_export_operator"
|
|
"--skip=service::organization::tests::test_organization"
|
|
];
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
rev-prefix = "v";
|
|
ignoredVersions = "rc";
|
|
};
|
|
|
|
meta = {
|
|
description = "Cloud-native observability platform built specifically for logs, metrics, traces, analytics & realtime user-monitoring";
|
|
homepage = "https://github.com/openobserve/openobserve";
|
|
changelog = "https://github.com/openobserve/openobserve/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ happysalada ];
|
|
mainProgram = "openobserve";
|
|
};
|
|
}
|