2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-06-06 07:54:09 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
2020-05-29 06:06:01 +00:00
|
|
|
, setuptools
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-cov
|
2021-06-06 07:54:09 +00:00
|
|
|
, pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pglast";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
# PyPI tarball does not include all the required files
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lelit";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "0l7nvbs1x1qil6mc0rxk7925i5xr3nbqnv0vakx3yv911kj3yhgv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
propagatedBuildInputs = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = [ pytest pytest-cov ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
pythonImportsCheck = [ "pglast" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/lelit/pglast";
|
|
|
|
description = "PostgreSQL Languages AST and statements prettifier";
|
2021-06-06 07:54:09 +00:00
|
|
|
changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|