diff --git a/pkgs/development/python-modules/asyncpg/default.nix b/pkgs/development/python-modules/asyncpg/default.nix new file mode 100644 index 000000000000..a71ffd853675 --- /dev/null +++ b/pkgs/development/python-modules/asyncpg/default.nix @@ -0,0 +1,38 @@ +{ lib, isPy3k, fetchPypi, fetchpatch, buildPythonPackage +, uvloop, postgresql }: + +buildPythonPackage rec { + pname = "asyncpg"; + version = "0.18.3"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "0rrch478ww6ipmh3617sb2jzwsq4w7pjcck869p35zb0mk5fr9aq"; + }; + + patches = [ + (fetchpatch { + url = "https://github.com/MagicStack/asyncpg/commit/aaeb7076e5acb045880b46155014c0640624797e.patch"; + sha256 = "0r6g6pvb39vzci8g67mv9rlrvavqvfz6vlv8988wv53bpz1mss3p"; + }) + ]; + + checkInputs = [ + uvloop + postgresql + ]; + + meta = with lib; { + homepage = https://github.com/MagicStack/asyncpg; + description = "An asyncio PosgtreSQL driver"; + longDescription = '' + Asyncpg is a database interface library designed specifically for + PostgreSQL and Python/asyncio. asyncpg is an efficient, clean + implementation of PostgreSQL server binary protocol for use with Python’s + asyncio framework. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ eadwu ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e88cf341da7..f5c0fe05ccf7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1342,6 +1342,8 @@ in { astor = callPackage ../development/python-modules/astor {}; + asyncpg = callPackage ../development/python-modules/asyncpg { }; + asyncssh = callPackage ../development/python-modules/asyncssh { }; python-fontconfig = callPackage ../development/python-modules/python-fontconfig { };