2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchpatch
|
2021-02-05 17:12:51 +00:00
|
|
|
, poetry-core
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
, pythonOlder
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytile";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2023.08.0";
|
2021-07-14 22:03:04 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-wPtGofli3ZKBcAwjwjCbeYnLaSZ5lLshlBSz1/WlAcg=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# This patch removes references to setuptools and wheel that are no longer
|
|
|
|
# necessary and changes poetry to poetry-core, so that we don't need to add
|
|
|
|
# unnecessary nativeBuildInputs.
|
|
|
|
#
|
|
|
|
# https://github.com/bachya/pytile/pull/286
|
|
|
|
#
|
|
|
|
(fetchpatch {
|
|
|
|
name = "clean-up-build-dependencies.patch";
|
|
|
|
url = "https://github.com/bachya/pytile/commit/bdb5d96ba9d640bf85a1ae9c3787704dbc2ced23.patch";
|
|
|
|
hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-15 22:18:51 +00:00
|
|
|
aresponses
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Ignore the examples as they are prefixed with test_
|
|
|
|
"examples/"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pytile"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|