1{ lib 2, aiohttp 3, aresponses 4, buildPythonPackage 5, fetchFromGitHub 6, poetry-core 7, pydantic 8, pytest-asyncio 9, pytestCheckHook 10, pythonOlder 11, yarl 12}: 13 14buildPythonPackage rec { 15 pname = "tailscale"; 16 version = "0.3.0"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "frenck"; 23 repo = "python-tailscale"; 24 rev = "v${version}"; 25 sha256 = "sha256-gGDsVGsCBZi/pxD0cyH3+xrvHVBC+wJCcl/NGqsTqiE="; 26 }; 27 28 nativeBuildInputs = [ 29 poetry-core 30 ]; 31 32 propagatedBuildInputs = [ 33 aiohttp 34 pydantic 35 yarl 36 ]; 37 38 checkInputs = [ 39 aresponses 40 pytest-asyncio 41 pytestCheckHook 42 ]; 43 44 postPatch = '' 45 # Upstream doesn't set a version for the pyproject.toml 46 substituteInPlace pyproject.toml \ 47 --replace "0.0.0" "${version}" \ 48 --replace "--cov" "" 49 ''; 50 51 pythonImportsCheck = [ 52 "tailscale" 53 ]; 54 55 meta = with lib; { 56 description = "Python client for the Tailscale API"; 57 homepage = "https://github.com/frenck/python-tailscale"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}