2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-01-07 13:22:53 +00:00
|
|
|
, python
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, postgresql }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pgsanity";
|
|
|
|
version = "0.2.9";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "de0bbd6fe4f98bf5139cb5f466eac2e2abaf5a7b050b9e4867b87bf360873173";
|
|
|
|
};
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover -s test
|
|
|
|
'';
|
|
|
|
|
2019-10-04 16:44:51 +00:00
|
|
|
checkInputs = [ postgresql ];
|
2019-01-07 13:22:53 +00:00
|
|
|
propagatedBuildInputs = [ postgresql ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-04-22 08:14:28 +00:00
|
|
|
homepage = "https://github.com/markdrago/pgsanity";
|
2019-01-07 13:22:53 +00:00
|
|
|
description = "Checks the syntax of Postgresql SQL files";
|
|
|
|
longDescription = ''
|
|
|
|
PgSanity checks the syntax of Postgresql SQL files by
|
2019-10-18 20:01:21 +00:00
|
|
|
taking a file that has a list of bare SQL in it,
|
|
|
|
making that file look like a C file with embedded SQL,
|
|
|
|
run it through ecpg and
|
2019-01-07 13:22:53 +00:00
|
|
|
let ecpg report on the syntax errors of the SQL.
|
|
|
|
'';
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nalbyuites ];
|
|
|
|
};
|
|
|
|
}
|