mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 13:13:33 +00:00
49 lines
996 B
Nix
49 lines
996 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pythonOlder
|
|
, setuptools
|
|
, pytest
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pglast";
|
|
version = "5.4";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-fyLvgaYHmTh9OaWXkuenKmNTHCVYFln/FbN+5u2a9+8=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace "--cov=pglast --cov-report term-missing" ""
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
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 = with maintainers; [ marsam ];
|
|
mainProgram = "pgpp";
|
|
};
|
|
}
|