diff --git a/pkgs/development/python-modules/tailscale/default.nix b/pkgs/development/python-modules/tailscale/default.nix new file mode 100644 index 000000000000..a2e58322cea3 --- /dev/null +++ b/pkgs/development/python-modules/tailscale/default.nix @@ -0,0 +1,61 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pydantic +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, yarl +}: + +buildPythonPackage rec { + pname = "tailscale"; + version = "0.1.2"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "frenck"; + repo = "python-tailscale"; + rev = "v${version}"; + sha256 = "1jqx2i8rghfxlb1c76f37viz9fc1vq95xb2jm3bpnx5yy4n5dly1"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + pydantic + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace "0.0.0" "${version}" \ + --replace "--cov" "" + ''; + + pythonImportsCheck = [ + "tailscale" + ]; + + meta = with lib; { + description = "Python client for the Tailscale API"; + homepage = "https://github.com/frenck/python-wled"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 10c51cac342e..3d8e7441d4fe 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9097,6 +9097,8 @@ in { tailer = callPackage ../development/python-modules/tailer { }; + tailscale = callPackage ../development/python-modules/tailscale { }; + tappy = callPackage ../development/python-modules/tappy { }; tasklib = callPackage ../development/python-modules/tasklib { };