Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, importlib-metadata 5, passlib 6, python-dateutil 7, pythonOlder 8, scramp 9, setuptools 10}: 11 12buildPythonPackage rec { 13 pname = "pg8000"; 14 version = "1.29.4"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-dtKqF1ejC8ceAwfa4Yw3TjNqaRI+awRuIGqWYR+iozA="; 22 }; 23 24 nativeBuildInputs = [ 25 setuptools 26 ]; 27 28 propagatedBuildInputs = [ 29 passlib 30 python-dateutil 31 scramp 32 ] ++ lib.optionals (pythonOlder "3.8") [ 33 importlib-metadata 34 ]; 35 36 postPatch = '' 37 sed '/^\[metadata\]/a version = ${version}' setup.cfg 38 ''; 39 40 # Tests require a running PostgreSQL instance 41 doCheck = false; 42 43 pythonImportsCheck = [ 44 "pg8000" 45 ]; 46 47 meta = with lib; { 48 description = "Python driver for PostgreSQL"; 49 homepage = "https://github.com/tlocke/pg8000"; 50 changelog = "https://github.com/tlocke/pg8000#release-notes"; 51 license = with licenses; [ bsd3 ]; 52 maintainers = with maintainers; [ domenkozar ]; 53 platforms = platforms.unix; 54 }; 55}