1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-27 03:26:50 +03:00
nixpkgs/pkgs/development/python-modules/pglast/default.nix

44 lines
965 B
Nix
Raw Normal View History

2019-06-01 22:32:22 -05:00
{ lib
, buildPythonPackage
2021-08-25 22:44:50 -05:00
, fetchPypi
2019-06-01 22:32:22 -05:00
, isPy3k
2020-05-23 04:20:00 -05:00
, setuptools
2021-06-04 04:20:00 +00:00
, pytest
2019-06-01 22:32:22 -05:00
}:
buildPythonPackage rec {
pname = "pglast";
2022-02-25 02:11:02 +00:00
version = "3.9";
2021-08-25 22:44:50 -05:00
src = fetchPypi {
inherit pname version;
2022-02-25 02:11:02 +00:00
sha256 = "sha256-fwXOfQW+ybhROdgayOAsgaFjf8HHh5jr5xczkBnA40w=";
2019-06-01 22:32:22 -05:00
};
disabled = !isPy3k;
2021-10-13 15:40:15 +00:00
# ModuleNotFoundError: No module named 'pkg_resources'
2021-06-04 04:20:00 +00:00
propagatedBuildInputs = [ setuptools ];
2019-06-01 22:32:22 -05:00
2021-10-13 15:40:15 +00:00
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=pglast --cov-report term-missing" ""
'';
2019-06-01 22:32:22 -05:00
2021-10-13 15:40:15 +00:00
checkInputs = [ pytest ];
2021-06-04 04:20:00 +00:00
2021-10-13 15:40:15 +00:00
# pytestCheckHook doesn't work
# ImportError: cannot import name 'parse_sql' from 'pglast'
2019-06-01 22:32:22 -05: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-01 22:32:22 -05:00
license = licenses.gpl3Plus;
maintainers = [ maintainers.marsam ];
};
}