about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2020-07-21 11:08:04 -0400
committerChris Ostrouchov <chris.ostrouchov@gmail.com>2020-07-21 11:09:04 -0400
commit6916342acb06690c73a1a5b5402fc8577ea0dfe7 (patch)
tree0bfe6d39a063684d7bd1050a37856a21eb3c01ef
parent2f3bec75420808d0c1b40e31d6e385c936de95ee (diff)
downloadnixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.tar
nixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.tar.gz
nixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.tar.bz2
nixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.tar.lz
nixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.tar.xz
nixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.tar.zst
nixlib-6916342acb06690c73a1a5b5402fc8577ea0dfe7.zip
python3Packages.pq: init at 1.8.1
-rw-r--r--pkgs/development/python-modules/pq/default.nix41
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pq/default.nix b/pkgs/development/python-modules/pq/default.nix
new file mode 100644
index 000000000000..1227a6749883
--- /dev/null
+++ b/pkgs/development/python-modules/pq/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, psycopg2
+, isPy27
+}:
+
+buildPythonPackage rec {
+  pname = "pq";
+  version = "1.8.1";
+  disabled = isPy27;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "9e2c0195488263902ebc9da8df6c82bebe4ee32c79d9ecd0cdc2945afbf7ad32";
+  };
+
+  # psycopg2cffi is compatible with psycopg2 and author states that
+  # module is compatible with psycopg2
+  postConfigure = ''
+    substituteInPlace setup.py \
+      --replace "psycopg2cffi" "psycopg2"
+
+    substituteInPlace pq/tests.py \
+      --replace "psycopg2cffi" "psycopg2"
+  '';
+
+  checkInputs = [
+    psycopg2
+  ];
+
+  # tests require running postgresql cluster
+  doCheck = false;
+
+  meta = with lib; {
+    description = "PQ is a transactional queue for PostgreSQL";
+    homepage = https://github.com/malthe/pq/;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.costrouc ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ebf2585bfffe..ec2d617485c6 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5290,6 +5290,8 @@ in {
 
   pproxy = callPackage ../development/python-modules/pproxy { };
 
+  pq = callPackage ../development/python-modules/pq { };
+
   praw = if isPy3k then callPackage ../development/python-modules/praw { }
     else callPackage ../development/python-modules/praw/6.3.nix { };