Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 51 lines 1.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 duckdb, 5 fetchFromGitHub, 6 pytestCheckHook, 7 python-dateutil, 8 pythonOlder, 9 setuptools, 10 setuptools-scm, 11}: 12 13buildPythonPackage rec { 14 pname = "sqlglot"; 15 version = "25.20.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 repo = "sqlglot"; 22 owner = "tobymao"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-RE9Hbb3g6j4j5X2ksjcBZ610RcV7Zd3YaKaBIUyD2vU="; 25 }; 26 27 nativeBuildInputs = [ 28 setuptools 29 setuptools-scm 30 ]; 31 32 propagatedBuildInputs = [ 33 # Optional dependency used in the sqlglot optimizer 34 python-dateutil 35 ]; 36 37 nativeCheckInputs = [ 38 pytestCheckHook 39 duckdb 40 ]; 41 42 pythonImportsCheck = [ "sqlglot" ]; 43 44 meta = with lib; { 45 description = "No dependency Python SQL parser, transpiler, and optimizer"; 46 homepage = "https://github.com/tobymao/sqlglot"; 47 changelog = "https://github.com/tobymao/sqlglot/blob/v${version}/CHANGELOG.md"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ cpcloud ]; 50 }; 51}