2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
amqtt,
|
|
|
|
buildPythonPackage,
|
|
|
|
certifi,
|
|
|
|
docopt,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
geopy,
|
|
|
|
mock,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
websockets,
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "volvooncall";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.10.4";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "molobrakos";
|
|
|
|
repo = "volvooncall";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-xr3g93rt3jvxVZrZY7cFh5eBP3k0arsejsgvx8p5EV4=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
patches = [
|
2023-05-24 13:37:59 +00:00
|
|
|
# Remove asynctest, https://github.com/molobrakos/volvooncall/pull/92
|
2023-02-02 18:25:31 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-asnyc.patch";
|
|
|
|
url = "https://github.com/molobrakos/volvooncall/commit/ef0df403250288c00ed4c600e9dfa79dcba8941e.patch";
|
|
|
|
hash = "sha256-U+hM7vzD9JSEUumvjPSLpVQcc8jAuZHG3/1dQ3wnIcA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-03-30 09:31:56 +00:00
|
|
|
console = [
|
|
|
|
certifi
|
|
|
|
docopt
|
|
|
|
geopy
|
|
|
|
];
|
|
|
|
mqtt = [
|
|
|
|
amqtt
|
|
|
|
certifi
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
checkInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
mock
|
2022-03-05 16:20:37 +00:00
|
|
|
pytest-asyncio
|
2022-03-30 09:31:56 +00:00
|
|
|
pytestCheckHook
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ passthru.optional-dependencies.mqtt;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "volvooncall" ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Retrieve information from the Volvo On Call web service";
|
|
|
|
homepage = "https://github.com/molobrakos/volvooncall";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/molobrakos/volvooncall/releases/tag/v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.unlicense;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "voc";
|
2022-03-05 16:20:37 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|