Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ simd-json = "0.15"
similar-asserts = "1.6.0"
smallvec = { version = "1", features = ["serde"] }
snafu = "0.8"
sqlparser = { git = "https://github.com/GreptimeTeam/sqlparser-rs.git", rev = "0cf6c04490d59435ee965edd2078e8855bd8471e", features = [
sqlparser = { git = "https://github.com/GreptimeTeam/sqlparser-rs.git", rev = "e4e9f49f52dbca4b67f8a83a3a209227d44f3cd9", features = [
"visitor",
"serde",
] } # branch = "v0.54.x"
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 74 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "Development environment flake";
description = "GreptimeDB as nix flake";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
Expand All @@ -18,37 +18,87 @@
libgit2
libz
];
nativeBuildInputs = with pkgs; [
pkg-config
git
clang
gcc
protobuf
gnumake
mold
(rustToolchain.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
"llvm-tools"
])
cargo-nextest
cargo-llvm-cov
taplo
curl
gnuplot ## for cargo bench
];

lib = nixpkgs.lib;
rustToolchain = fenix.packages.${system}.fromToolchainName {
name = (lib.importTOML ./rust-toolchain.toml).toolchain.channel;
sha256 = "sha256-tJJr8oqX3YD+ohhPK7jlt/7kvKBnBqJVjYtoFr520d4=";
};

# Read Cargo.toml to get package name and version
cargoToml = lib.importTOML ./Cargo.toml;
packageName = "greptimedb";
packageVersion = cargoToml.workspace.package.version;
in
{
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = packageName;
version = packageVersion;

src = lib.cleanSource ./.;

cargoLock = {
lockFile = ./Cargo.lock;
allowBuiltinFetchGit = true;
outputHashes = {
"datafusion-45.0.0" = "sha256-Js5E0m0igvpo6WcOws6sRs3JGreNTxPOFjRSsBQnJfk=";
"greptime-proto-0.1.0" = "sha256-gLgzqreOeDQmwMHkZu+iYUSmMRN0qdFKm8JwCNugI6w=";
"influxdb_line_protocol-0.1.0" = "sha256-RvPS4erQDrMxzPbZu8gT4g5q9UHMaq9DS5P0kb0UhD4=";
"jsonb-0.4.3" = "sha256-/nBUhsbDtuKqDpPNeP5dAqDaIFKMGoIsqv07qHZmkug=";
"loki-proto-0.1.0" = "sha256-puwIdzwZ9zKh6BCgXZ2iE1f3f733GtByNbr3GvTrTkw=";
"meter-core-0.1.0" = "sha256-E2lvqsfY5nEKgXcHAubzNKcZveX8VI0GMT9OSRvIFgs=";
"opensrv-mysql-0.8.0" = "sha256-UJcihra+L7L5bOOtayjMqKKpkTYYxPre8Fwd1lvOc18=";
"orc-rust-0.6.0" = "sha256-uPG94OF5l6JxWbjiejqJ6Zz+vOX9hL3pamomz2hkrG8=";
"otel-arrow-rust-0.1.0" = "sha256-PB6zInde/ASQR7fqMs44IhaXqMpKW5AILMZOnaPN2eY=";
"pgwire-0.30.2" = "sha256-TJMYAleRrXp8nW5l/OXfHji+AgyBGsxUamrhMLn8hps=";
"rskafka-0.6.0" = "sha256-wjJ+FuHSBu5a5tSYq22ZrQGLHou/aIcsmUT0j1OinJw=";
"sqlness-0.6.1" = "sha256-ZtUVLJ1U4A6mNR+iNvRtkhIPWHe2ZSJ+kt533B6vivQ=";
"sqlparser-0.54.0-greptime" = "sha256-l2Szp9ytcbXJDyvYR+jKFwa+AYqtwZvFqQ3KzgGbH2A=";
"uddsketch-0.1.0" = "sha256-VEub0vUF3w7U5LZsmBueegHNiuAE6jSgyo+x5r1C4h8=";
};
};

inherit buildInputs;
inherit nativeBuildInputs;

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
NIX_HARDENING_ENABLE = "";

cargoBuildFlags = [ "--bin" "greptime" ];

meta = with lib; {
description = "Cloud-native database for observability.";
license = licenses.asl20;
maintainers = [ "[email protected]" ];
platforms = platforms.all;
};
};

devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
pkg-config
git
clang
gcc
protobuf
gnumake
mold
(rustToolchain.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
"llvm-tools"
])
cargo-nextest
cargo-llvm-cov
taplo
curl
gnuplot ## for cargo bench
];
inherit nativeBuildInputs;

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
NIX_HARDENING_ENABLE = "";
Expand Down
Loading