8e65f7f0cc
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
43 lines
965 B
Nix
43 lines
965 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy3k
|
|
, setuptools
|
|
, pytest
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pglast";
|
|
version = "3.9";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-fwXOfQW+ybhROdgayOAsgaFjf8HHh5jr5xczkBnA40w=";
|
|
};
|
|
|
|
disabled = !isPy3k;
|
|
|
|
# ModuleNotFoundError: No module named 'pkg_resources'
|
|
propagatedBuildInputs = [ setuptools ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace "--cov=pglast --cov-report term-missing" ""
|
|
'';
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
# pytestCheckHook doesn't work
|
|
# ImportError: cannot import name 'parse_sql' from 'pglast'
|
|
checkPhase = ''
|
|
pytest
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/lelit/pglast";
|
|
description = "PostgreSQL Languages AST and statements prettifier";
|
|
changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|