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
82 lines
1.8 KiB
Nix
82 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
pkg-config,
|
|
protobuf,
|
|
openssl,
|
|
sqlite,
|
|
zstd,
|
|
cmake,
|
|
|
|
nix-update-script,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "sqld";
|
|
version = "0.24.32";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tursodatabase";
|
|
repo = "libsql";
|
|
tag = "libsql-server-v${version}";
|
|
hash = "sha256-CiTJ9jLANBrncz/O/0k2/UI/qGCTGWLZuLQdncunlX8";
|
|
};
|
|
|
|
patches = [
|
|
# https://github.com/tursodatabase/libsql/pull/1981
|
|
# A CMakeLists.txt broke builds by forcing the '-msse4.2' and '-maes' x86-specific compile flags,
|
|
# when compiling with Clang, regardless of the host platform's architecture.
|
|
(fetchpatch {
|
|
url = "https://github.com/tursodatabase/libsql/commit/5ce88e8cf9476ea64453bf1532d75c8faf037aad.patch";
|
|
hash = "sha256-5M6XNp0EpCZMZb7NC7TBGBVdZLkC74vwqEnVTCZ7n5U=";
|
|
})
|
|
];
|
|
|
|
cargoBuildFlags = [
|
|
"--bin"
|
|
"sqld"
|
|
];
|
|
|
|
cargoHash = "sha256-4Ma/17t+EmmjiYICBLhJifQez0dnwtjhlkmoQrAIG+s";
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
protobuf
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
sqlite
|
|
zstd
|
|
];
|
|
|
|
env.ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
|
|
# error[E0425]: cannot find function `consume_budget` in module `tokio::task`
|
|
env.RUSTFLAGS = "--cfg tokio_unstable";
|
|
|
|
# requires a complex setup with podman for the end-to-end tests
|
|
doCheck = false;
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
doInstallCheck = true;
|
|
versionCheckProgramArg = "--version";
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "LibSQL with extended capabilities like HTTP protocol, replication, and more";
|
|
homepage = "https://github.com/tursodatabase/libsql";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ dit7ya ];
|
|
mainProgram = "sqld";
|
|
};
|
|
}
|