1{ lib
2, fetchPypi
3, buildPythonPackage
4, uvloop
5, postgresql
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "asyncpg";
11 version = "0.27.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-cgmG2aRwXdikD98XIDb1rnhyJQNqfrRucExFqo9iwFQ=";
19 };
20
21 # sandboxing issues on aarch64-darwin, see https://github.com/NixOS/nixpkgs/issues/198495
22 doCheck = postgresql.doCheck;
23
24 checkInputs = [
25 uvloop
26 postgresql
27 ];
28
29 pythonImportsCheck = [
30 "asyncpg"
31 ];
32
33 meta = with lib; {
34 description = "Asyncio PosgtreSQL driver";
35 homepage = "https://github.com/MagicStack/asyncpg";
36 longDescription = ''
37 Asyncpg is a database interface library designed specifically for
38 PostgreSQL and Python/asyncio. asyncpg is an efficient, clean
39 implementation of PostgreSQL server binary protocol for use with Python's
40 asyncio framework.
41 '';
42 license = licenses.asl20;
43 maintainers = with maintainers; [ eadwu ];
44 };
45}