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 = "23.1.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "ludeeus"; 20 repo = pname; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-njlDScmxIYWxB4EL9lOSGCXqZDzP999gI9EkpcZyFlE="; 23 }; 24 25 propagatedBuildInputs = [ 26 aiohttp 27 ]; 28 29 nativeCheckInputs = [ 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 changelog = "https://github.com/ludeeus/pyaftership/releases/tag/${version}"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ jamiemagee ]; 52 }; 53}