2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, asynctest
|
2021-03-23 19:22:30 +00:00
|
|
|
, buildPythonPackage
|
2021-01-15 22:18:51 +00:00
|
|
|
, cryptography
|
2021-03-23 19:22:30 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-03-23 19:22:30 +00:00
|
|
|
, pythonOlder
|
|
|
|
, stdiomask
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "subarulink";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.5.0";
|
2021-12-21 02:18:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "G-Two";
|
|
|
|
repo = pname;
|
2021-07-17 21:14:59 +00:00
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-q+a+OFFMAGl8KQi+KZ8h21+Pj0XEqP9ZIJii2PCgD6E=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
stdiomask
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
asynctest
|
|
|
|
cryptography
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
postPatch = ''
|
2021-12-21 02:18:32 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=subarulink" ""
|
2021-03-23 19:22:30 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"subarulink"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for interacting with STARLINK-enabled vehicle";
|
|
|
|
homepage = "https://github.com/G-Two/subarulink";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|