Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 996 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, setuptools 6, pytest 7}: 8 9buildPythonPackage rec { 10 pname = "pglast"; 11 version = "5.2"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-zj7/WGECL5Ou4F2FdFaA3M9F92ETZbhEXbZJ628gg0o="; 19 }; 20 21 propagatedBuildInputs = [ 22 setuptools 23 ]; 24 25 postPatch = '' 26 substituteInPlace setup.cfg \ 27 --replace "--cov=pglast --cov-report term-missing" "" 28 ''; 29 30 nativeCheckInputs = [ 31 pytest 32 ]; 33 34 # pytestCheckHook doesn't work 35 # ImportError: cannot import name 'parse_sql' from 'pglast' 36 checkPhase = '' 37 pytest 38 ''; 39 40 meta = with lib; { 41 homepage = "https://github.com/lelit/pglast"; 42 description = "PostgreSQL Languages AST and statements prettifier"; 43 changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst"; 44 license = licenses.gpl3Plus; 45 maintainers = with maintainers; [ marsam ]; 46 mainProgram = "pgpp"; 47 }; 48}