at master 893 B view raw
1{ 2 lib, 3 async-timeout, 4 buildPythonPackage, 5 fetchFromGitHub, 6 psycopg2, 7 pythonOlder, 8}: 9 10buildPythonPackage rec { 11 pname = "aiopg"; 12 version = "1.4.0"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "aio-libs"; 19 repo = "aiopg"; 20 rev = "v${version}"; 21 hash = "sha256-GD5lRSUjASTwBk5vEK8v3xD8eNyxpwSrO3HHvtwubmk="; 22 }; 23 24 propagatedBuildInputs = [ 25 async-timeout 26 psycopg2 27 ]; 28 29 postPatch = '' 30 substituteInPlace setup.py \ 31 --replace "psycopg2-binary" "psycopg2" 32 ''; 33 34 # Tests requires a PostgreSQL Docker instance 35 doCheck = false; 36 37 pythonImportsCheck = [ "aiopg" ]; 38 39 meta = with lib; { 40 description = "Python library for accessing a PostgreSQL database"; 41 homepage = "https://aiopg.readthedocs.io/"; 42 license = with licenses; [ bsd2 ]; 43 maintainers = with maintainers; [ fab ]; 44 }; 45}