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";
|
2020-08-16 18:31:09 +01:00
|
|
|
version = "1.12";
|
2019-06-02 04:32:22 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 18:31:09 +01:00
|
|
|
sha256 = "b5d6a105928d2285e43afb87d638ada844ed8933cc306c23a3c095684f3d3af4";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|