2019-06-02 05:32:22 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2020-05-23 11:20:00 +02:00
|
|
|
, setuptools
|
2019-06-02 05:32:22 +02:00
|
|
|
, aenum
|
|
|
|
, pytest
|
|
|
|
, pytestcov
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pglast";
|
2021-03-02 10:26:32 +01:00
|
|
|
version = "1.17";
|
2019-06-02 05:32:22 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-02 10:26:32 +01:00
|
|
|
sha256 = "2979b38ca5f72cfa0a5db78af2f62d04db6a7647ee7f03eac7a67f9e86e3f5f9";
|
2019-06-02 05:32:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-05-23 11:20:00 +02:00
|
|
|
propagatedBuildInputs = [ setuptools ] ++ lib.optionals (pythonOlder "3.6") [ aenum ];
|
2019-06-02 05:32:22 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|