Skip to content

Commit

Permalink
add parseable
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Sep 9, 2023
1 parent dd0d427 commit 7e6562c
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions pkgs/server/parseable.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{ lib
, rustPlatform
, stdenvNoCC
, fetchFromGitHub
, pkg-config
, bzip2
, openssl
, xz
, zstd
, stdenv
, unzip
, darwin
}:
let
frontend =
let
pname = "parseable-frontend";
version = "0.2.4";
in
stdenvNoCC.mkDerivation rec {
inherit pname version;
src = builtins.fetchurl {
url = "https://github.com/parseablehq/console/releases/download/v${version}/build.zip";
sha256 = "1i4nhz2knzm0x1crmixpcigs2gzcc48x3b1zzssmsqn7lab9vjcq";
};
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
${unzip}/bin/unzip ${src}
'';
installPhase = ''
mkdir -p $out
cp -r . $out
'';
};
in
rustPlatform.buildRustPackage rec {
pname = "parseable";
version = "0.6.2";

src = fetchFromGitHub {
owner = "parseablehq";
repo = "parseable";
rev = "v${version}";
hash = "sha256-Gjx/2LNoeTcLNf0kXmEdQ6O8WB53jic8KhV72h9Fd6A=";
};

cargoHash = "sha256-86j2LzRnmY6KRsfnF4trZoSmnibwbGxFA9U2b++mml4=";

LOCAL_ASSETS_PATH = "${frontend}/dist";

nativeBuildInputs = [
pkg-config
];

buildInputs = [
bzip2
openssl
xz
zstd
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.IOKit
darwin.apple_sdk.frameworks.Security
];

env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};

meta = with lib; {
description = "Log analytics system written in Rust. It is built for high throughput log ingestion cases";
homepage = "https://github.com/parseablehq/parseable";
license = licenses.agpl3Only;
maintainers = with maintainers; [ jpetrucciani ];
};
}

0 comments on commit 7e6562c

Please sign in to comment.