about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aiopg
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-05-08 20:50:24 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-05-08 20:50:24 +0200
commite47dde2e2e9b18d7047daa77d69aecf7095c9eae (patch)
tree0171139320c8c5612f0dfa06930daad6078845d4 /pkgs/development/python-modules/aiopg
parentb3676834ca70a0ec336a9e1944ea9ab020e48c3c (diff)
python3Packages.aiopg: init at 1.2.1
Diffstat (limited to 'pkgs/development/python-modules/aiopg')
-rw-r--r--pkgs/development/python-modules/aiopg/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aiopg/default.nix b/pkgs/development/python-modules/aiopg/default.nix
new file mode 100644
index 0000000000000..cb9cd327e8ce4
--- /dev/null
+++ b/pkgs/development/python-modules/aiopg/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, async-timeout
+, buildPythonPackage
+, fetchFromGitHub
+, psycopg2
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "aiopg";
+  version = "1.2.1";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "aio-libs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0c6s2p1fjbdk1ygpl6a1s1rbnsk8gw9kj99pf98nxhb9j3iahas4";
+  };
+
+  propagatedBuildInputs = [
+    async-timeout
+    psycopg2
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "psycopg2-binary" "psycopg2"
+  '';
+
+  # Tests requires a PostgreSQL Docker instance
+  doCheck = false;
+
+  pythonImportsCheck = [ "aiopg" ];
+
+  meta = with lib; {
+    description = "Python library for accessing a PostgreSQL database";
+    homepage = "https://aiopg.readthedocs.io/";
+    license = with licenses; [ bsd2 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}