2020-12-25 13:55:36 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-05-24 13:37:59 +00:00
|
|
|
, flit-core
|
2020-12-25 13:55:36 +00:00
|
|
|
, installShellFiles
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, django
|
|
|
|
, django_4
|
|
|
|
, django-silk
|
|
|
|
, pgadmin4
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlparse";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.4.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-1EYYPoS4NJ+jBh8P5/BsqUumW0JpRv/r5uPoKVMyQgw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flit-core installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage docs/sqlformat.1
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit django django_4 django-silk pgadmin4;
|
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Non-validating SQL parser for Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sqlformat";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Provides support for parsing, splitting and formatting SQL statements.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/andialbrecht/sqlparse";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|