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