blob: debb75faae0156ad9eed00514338c3938df0c001 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{
lib,
fetchPypi,
buildPythonPackage,
postgresql,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "pgsanity";
version = "0.2.9";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "de0bbd6fe4f98bf5139cb5f466eac2e2abaf5a7b050b9e4867b87bf360873173";
};
nativeCheckInputs = [
unittestCheckHook
];
unittestFlagsArray = [ "test" ];
propagatedBuildInputs = [ postgresql ];
# To find "ecpg"
nativeBuildInputs = [ (lib.getDev postgresql) ];
meta = {
homepage = "https://github.com/markdrago/pgsanity";
description = "Checks the syntax of Postgresql SQL files";
mainProgram = "pgsanity";
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.
'';
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nalbyuites ];
};
}
|