mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +00:00
35 lines
748 B
Nix
35 lines
748 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, pytestCheckHook
|
|
, python-dateutil
|
|
, duckdb
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "sqlglot";
|
|
version = "6.0.7";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "sqlglot";
|
|
owner = "tobymao";
|
|
rev = "v${version}";
|
|
hash = "sha256-7PBhf9NN/mCi92xSkB9ygfmfxTyOYaEyrNvL309sG5Y=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ python-dateutil ];
|
|
|
|
checkInputs = [ pytestCheckHook duckdb ];
|
|
|
|
pythonImportsCheck = [ "sqlglot" ];
|
|
|
|
meta = with lib; {
|
|
description = "A no dependency Python SQL parser, transpiler, and optimizer";
|
|
homepage = "https://github.com/tobymao/sqlglot";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
};
|
|
}
|