472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
51 lines
1 KiB
Nix
51 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
duckdb,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
python-dateutil,
|
|
pythonOlder,
|
|
setuptools,
|
|
setuptools-scm,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqlglot";
|
|
version = "25.20.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "sqlglot";
|
|
owner = "tobymao";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-RE9Hbb3g6j4j5X2ksjcBZ610RcV7Zd3YaKaBIUyD2vU=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
# Optional dependency used in the sqlglot optimizer
|
|
python-dateutil
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
duckdb
|
|
];
|
|
|
|
pythonImportsCheck = [ "sqlglot" ];
|
|
|
|
meta = with lib; {
|
|
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 = licenses.mit;
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
};
|
|
}
|