about summary refs log tree commit diff
path: root/pkgs/development/python-modules/psycopg2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/psycopg2/default.nix')
-rw-r--r--pkgs/development/python-modules/psycopg2/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/psycopg2/default.nix b/pkgs/development/python-modules/psycopg2/default.nix
index 88f3a8b24483..54d2ec749333 100644
--- a/pkgs/development/python-modules/psycopg2/default.nix
+++ b/pkgs/development/python-modules/psycopg2/default.nix
@@ -5,6 +5,7 @@
 , isPyPy
 , fetchPypi
 , postgresql
+, postgresqlTestHook
 , openssl
 , sphinxHook
 , sphinx-better-theme
@@ -48,9 +49,18 @@ buildPythonPackage rec {
 
   sphinxRoot = "doc/src";
 
-  # Requires setting up a PostgreSQL database
+  # test suite breaks at some point with:
+  #   current transaction is aborted, commands ignored until end of transaction block
   doCheck = false;
 
+  nativeCheckInputs = [
+    postgresqlTestHook
+  ];
+
+  env = {
+    PGDATABASE = "psycopg2_test";
+  };
+
   pythonImportsCheck = [
     "psycopg2"
   ];