summary refs log tree commit diff
diff options
context:
space:
mode:
authorAshijit Pramanik <ashijit007@gmail.com>2019-01-07 18:52:53 +0530
committerAshijit Pramanik <ashijit007@gmail.com>2019-01-10 18:13:33 +0530
commit06339255ca07a857f83d0b86811e4695118e49b7 (patch)
tree7c8dce15bac36d2ac7fb2ca1987bef4f3e0d6266
parent7b207060f1673e1978ad26ffa94dafc18d4c8324 (diff)
downloadnixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.tar
nixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.tar.gz
nixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.tar.bz2
nixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.tar.lz
nixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.tar.xz
nixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.tar.zst
nixpkgs-06339255ca07a857f83d0b86811e4695118e49b7.zip
pythonPackages.pgsanity: init at 0.2.9
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--pkgs/development/python-modules/pgsanity/default.nix35
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 42 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index f72d02bcbfd..dcd04a3830d 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -3053,6 +3053,11 @@
     github = "nadrieril";
     name = "Nadrieril Feneanar";
   };
+  nalbyuites = {
+    email = "ashijit007@gmail.com";
+    github = "nalbyuites";
+    name = "Ashijit Pramanik";
+  };
   namore = {
     email = "namor@hemio.de";
     github = "namore";
diff --git a/pkgs/development/python-modules/pgsanity/default.nix b/pkgs/development/python-modules/pgsanity/default.nix
new file mode 100644
index 00000000000..67c69aca2a2
--- /dev/null
+++ b/pkgs/development/python-modules/pgsanity/default.nix
@@ -0,0 +1,35 @@
+{ stdenv
+, 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
+  '';
+
+  propagatedBuildInputs = [ postgresql ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://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.
+    '';
+    license = stdenv.lib.licenses.mit;
+    maintainers = with maintainers; [ nalbyuites ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d0d12d2ca72..0211219efc2 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3388,6 +3388,8 @@ in {
 
   pg8000 = callPackage ../development/python-modules/pg8000 { };
 
+  pgsanity = callPackage ../development/python-modules/pgsanity { };
+
   pgspecial = callPackage ../development/python-modules/pgspecial { };
 
   pickleshare = callPackage ../development/python-modules/pickleshare { };