diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-01-10 08:08:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 08:08:54 +0100 |
commit | 9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b (patch) | |
tree | 2d45bb5b7f0b85855920c10efb07fdf5eec23f41 | |
parent | 425f1533e4ff66650f654d5db85f32ef4f17fc2d (diff) | |
parent | bd6bbfab13b489a88d691a11d27e62c980d95ca4 (diff) | |
download | nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.tar nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.tar.gz nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.tar.bz2 nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.tar.lz nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.tar.xz nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.tar.zst nixlib-9f3aa1bb43964652766f1e7d15a5f4b98cb7cf2b.zip |
Merge pull request #108883 from fabaff/pytile
-rw-r--r-- | pkgs/development/python-modules/pytile/default.nix | 56 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 59 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pytile/default.nix b/pkgs/development/python-modules/pytile/default.nix new file mode 100644 index 000000000000..d2fd99f6d166 --- /dev/null +++ b/pkgs/development/python-modules/pytile/default.nix @@ -0,0 +1,56 @@ +{ lib +, aiohttp +, async-timeout +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry +, pylint +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, pythonAtLeast +}: +buildPythonPackage rec { + pname = "pytile"; + version = "5.1.0"; + disabled = pythonAtLeast "3.9"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "0hdyb8ca4ihqf7yfkr3hbpkwz7g182ycra151y5dxn0319fillc3"; + }; + + format = "pyproject"; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ + aiohttp + pylint + ]; + + checkInputs = [ + aresponses + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + # Ignore the examples as they are prefixed with test_ + pytestFlagsArray = [ "--ignore examples/" ]; + pythonImportsCheck = [ "pytile" ]; + + meta = with lib; { + description = " Python API for Tile Bluetooth trackers"; + longDescription = '' + pytile is a simple Python library for retrieving information on Tile + Bluetooth trackers (including last location and more). + ''; + homepage = "https://github.com/bachya/pytile"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4e7f4ff5d0c1..c961ffe538c6 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -838,7 +838,7 @@ "threshold" = ps: with ps; [ ]; "tibber" = ps: with ps; [ ]; # missing inputs: pyTibber "tikteck" = ps: with ps; [ ]; # missing inputs: tikteck - "tile" = ps: with ps; [ ]; # missing inputs: pytile + "tile" = ps: with ps; [ pytile ]; "time_date" = ps: with ps; [ ]; "timer" = ps: with ps; [ ]; "tmb" = ps: with ps; [ ]; # missing inputs: tmb diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d9778b141e21..8b5f6ec0d607 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6230,6 +6230,8 @@ in { pyeverlights = callPackage ../development/python-modules/pyeverlights { }; + pytile = callPackage ../development/python-modules/pytile { }; + pytimeparse = callPackage ../development/python-modules/pytimeparse { }; pytmx = callPackage ../development/python-modules/pytmx { }; |