94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
39 lines
784 B
Nix
39 lines
784 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, flit-core
|
|
, installShellFiles
|
|
, pytestCheckHook
|
|
, isPy3k
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqlparse";
|
|
version = "0.4.4";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-1EYYPoS4NJ+jBh8P5/BsqUumW0JpRv/r5uPoKVMyQgw=";
|
|
};
|
|
|
|
format = "pyproject";
|
|
|
|
nativeBuildInputs = [ flit-core installShellFiles ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
postInstall = ''
|
|
installManPage docs/sqlformat.1
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Non-validating SQL parser for Python";
|
|
longDescription = ''
|
|
Provides support for parsing, splitting and formatting SQL statements.
|
|
'';
|
|
homepage = "https://github.com/andialbrecht/sqlparse";
|
|
license = licenses.bsd3;
|
|
};
|
|
}
|