Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.05 38 lines 891 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, pytestCheckHook 6, python-dateutil 7, duckdb 8, pyspark 9}: 10buildPythonPackage rec { 11 pname = "sqlglot"; 12 version = "10.5.2"; 13 14 disabled = pythonOlder "3.8"; 15 16 src = fetchFromGitHub { 17 repo = "sqlglot"; 18 owner = "tobymao"; 19 rev = "v${version}"; 20 hash = "sha256-ZFc2aOhCTRFlrzgnYDSdIZxRqKZ8FvkYSZRU0OMHI34="; 21 }; 22 23 propagatedBuildInputs = [ python-dateutil ]; 24 25 nativeCheckInputs = [ pytestCheckHook duckdb pyspark ]; 26 27 # these integration tests assume a running Spark instance 28 disabledTestPaths = [ "tests/dataframe/integration" ]; 29 30 pythonImportsCheck = [ "sqlglot" ]; 31 32 meta = with lib; { 33 description = "A no dependency Python SQL parser, transpiler, and optimizer"; 34 homepage = "https://github.com/tobymao/sqlglot"; 35 license = licenses.mit; 36 maintainers = with maintainers; [ cpcloud ]; 37 }; 38}