You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
966 B
43 lines
966 B
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy3k
|
|
, setuptools
|
|
, pytest
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pglast";
|
|
version = "3.10";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-rkoCtcBe5LBTTpmd+cj6s80UWXyTpMk74FipyK0t5go=";
|
|
};
|
|
|
|
disabled = !isPy3k;
|
|
|
|
# ModuleNotFoundError: No module named 'pkg_resources'
|
|
propagatedBuildInputs = [ setuptools ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace "--cov=pglast --cov-report term-missing" ""
|
|
'';
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
# pytestCheckHook doesn't work
|
|
# ImportError: cannot import name 'parse_sql' from 'pglast'
|
|
checkPhase = ''
|
|
pytest
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/lelit/pglast";
|
|
description = "PostgreSQL Languages AST and statements prettifier";
|
|
changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|
|
|