Diff: https://github.com/tobymao/sqlglot/compare/v27.6.0...v27.28.1 Changelog: https://github.com/tobymao/sqlglot/blob/v27.28.1/CHANGELOG.md
59 lines
1.0 KiB
Nix
59 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
setuptools,
|
|
setuptools-scm,
|
|
|
|
# dependencies
|
|
python-dateutil,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
duckdb,
|
|
numpy,
|
|
pandas,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqlglot";
|
|
version = "27.28.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "sqlglot";
|
|
owner = "tobymao";
|
|
tag = "v${version}";
|
|
hash = "sha256-DGpxKIlSRwKKXhZGDTTQb8a3iAzy8a7h9/PKHPCuq+g=";
|
|
};
|
|
|
|
build-system = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
dependencies = [
|
|
# Optional dependency used in the sqlglot optimizer
|
|
python-dateutil
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
duckdb
|
|
numpy
|
|
pandas
|
|
];
|
|
|
|
pythonImportsCheck = [ "sqlglot" ];
|
|
|
|
meta = {
|
|
description = "No dependency Python SQL parser, transpiler, and optimizer";
|
|
homepage = "https://github.com/tobymao/sqlglot";
|
|
changelog = "https://github.com/tobymao/sqlglot/blob/v${version}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ cpcloud ];
|
|
};
|
|
}
|