1{ lib 2, python 3, fetchPypi 4, buildPythonPackage 5, postgresql }: 6 7buildPythonPackage rec { 8 pname = "pgsanity"; 9 version = "0.2.9"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "de0bbd6fe4f98bf5139cb5f466eac2e2abaf5a7b050b9e4867b87bf360873173"; 14 }; 15 16 checkPhase = '' 17 ${python.interpreter} -m unittest discover -s test 18 ''; 19 20 checkInputs = [ postgresql ]; 21 propagatedBuildInputs = [ postgresql ]; 22 23 meta = with lib; { 24 homepage = "https://github.com/markdrago/pgsanity"; 25 description = "Checks the syntax of Postgresql SQL files"; 26 longDescription = '' 27 PgSanity checks the syntax of Postgresql SQL files by 28 taking a file that has a list of bare SQL in it, 29 making that file look like a C file with embedded SQL, 30 run it through ecpg and 31 let ecpg report on the syntax errors of the SQL. 32 ''; 33 license = licenses.mit; 34 maintainers = with maintainers; [ nalbyuites ]; 35 }; 36}