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