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-05-23 10:20:00 +01:00
|
|
|
version = "1.11";
|
2019-06-02 04:32:22 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-23 10:20:00 +01:00
|
|
|
sha256 = "8463d60b9065daf26e3c0fa6e7515d2a4594847ab417be018858832a475105f1";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|