2019-06-02 04:32:22 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2020-05-23 10:20:00 +01:00
|
|
|
, setuptools
|
2019-06-02 04:32:22 +01:00
|
|
|
, aenum
|
|
|
|
, pytest
|
|
|
|
, pytestcov
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pglast";
|
2021-03-02 09:26:32 +00:00
|
|
|
version = "1.17";
|
2019-06-02 04:32:22 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-02 09:26:32 +00:00
|
|
|
sha256 = "2979b38ca5f72cfa0a5db78af2f62d04db6a7647ee7f03eac7a67f9e86e3f5f9";
|
2019-06-02 04:32:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-05-23 10:20:00 +01:00
|
|
|
propagatedBuildInputs = [ setuptools ] ++ lib.optionals (pythonOlder "3.6") [ aenum ];
|
2019-06-02 04:32:22 +01:00
|
|
|
|
|
|
|
checkInputs = [ pytest pytestcov ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/lelit/pglast";
|
|
|
|
description = "PostgreSQL Languages AST and statements prettifier";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|