2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, python
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2022-09-09 14:08:57 +00:00
|
|
|
, postgresql
|
|
|
|
, unittestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pgsanity";
|
|
|
|
version = "0.2.9";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "de0bbd6fe4f98bf5139cb5f466eac2e2abaf5a7b050b9e4867b87bf360873173";
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook postgresql ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ postgresql ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/markdrago/pgsanity";
|
|
|
|
description = "Checks the syntax of Postgresql SQL files";
|
|
|
|
longDescription = ''
|
|
|
|
PgSanity checks the syntax of Postgresql SQL files by
|
|
|
|
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
|
|
|
|
let ecpg report on the syntax errors of the SQL.
|
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ nalbyuites ];
|
|
|
|
};
|
|
|
|
}
|