nixpkgs/pkgs/by-name/sq/sqld/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

68 lines
1.5 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
protobuf,
openssl,
sqlite,
zstd,
stdenv,
darwin,
cmake,
}:
rustPlatform.buildRustPackage rec {
pname = "sqld";
version = "0.24.18";
src = fetchFromGitHub {
owner = "tursodatabase";
repo = "libsql";
rev = "libsql-server-v${version}";
hash = "sha256-/0Sk55GBjUk/FeIoq/hGVaNGB0EM8CxygAXZ+ufvWKg=";
};
cargoBuildFlags = [
"--bin"
"sqld"
];
cargoHash = "";
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"console-api-0.5.0" = "sha256-MfaxtzOqyblk6aTMqJGRP+123aK0Kq7ODNp/3lehkpQ=";
"hyper-rustls-0.24.1" = "sha256-dYN42bnbY+4+etmimrnoyzmrKvCZ05fYr1qLQFvzRTk=";
"rheaper-0.2.0" = "sha256-u5z6J1nmUbIQjDDqqdkT0axNBOvwbFBYghYW/r1rDHc=";
"s3s-0.10.1-dev" = "sha256-y4DZnRsQzRNsCIp6vrppZkfXSP50LCHWYrKRoIHYPik=";
};
};
nativeBuildInputs = [
cmake
pkg-config
protobuf
rustPlatform.bindgenHook
];
buildInputs = [
openssl
sqlite
zstd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
env.ZSTD_SYS_USE_PKG_CONFIG = true;
# requires a complex setup with podman for the end-to-end tests
doCheck = false;
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 ];
};
}