1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, aiohttp 6, aresponses 7, pytest-asyncio 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "pyaftership"; 13 version = "21.11.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "ludeeus"; 20 repo = pname; 21 rev = version; 22 sha256 = "sha256-SN7fvI/+VHYn2eYQe5wp6lEZ73YeZbsiPjDiq/Ibk3Q="; 23 }; 24 25 propagatedBuildInputs = [ 26 aiohttp 27 ]; 28 29 checkInputs = [ 30 aresponses 31 pytest-asyncio 32 pytestCheckHook 33 ]; 34 35 postPatch = '' 36 # Upstream is releasing with the help of a CI to PyPI, GitHub releases 37 # are not in their focus 38 substituteInPlace setup.py \ 39 --replace 'version="main",' 'version="${version}",' 40 ''; 41 42 pythonImportsCheck = [ 43 "pyaftership" 44 ]; 45 46 meta = with lib; { 47 description = "Python wrapper package for the AfterShip API"; 48 homepage = "https://github.com/ludeeus/pyaftership"; 49 license = licenses.mit; 50 maintainers = with maintainers; [ jamiemagee ]; 51 }; 52}