nixpkgs/pkgs/development/python-modules/sqlglot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
891 B
Nix
Raw Normal View History

2022-09-18 14:05:23 +03:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, python-dateutil
, duckdb
, pyspark
2022-09-18 14:05:23 +03:00
}:
buildPythonPackage rec {
pname = "sqlglot";
version = "10.5.2";
2022-09-18 14:05:23 +03:00
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
repo = "sqlglot";
owner = "tobymao";
rev = "v${version}";
hash = "sha256-ZFc2aOhCTRFlrzgnYDSdIZxRqKZ8FvkYSZRU0OMHI34=";
2022-09-18 14:05:23 +03:00
};
propagatedBuildInputs = [ python-dateutil ];
nativeCheckInputs = [ pytestCheckHook duckdb pyspark ];
# these integration tests assume a running Spark instance
disabledTestPaths = [ "tests/dataframe/integration" ];
2022-09-18 14:05:23 +03:00
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 ];
};
}