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";
|
2021-12-21 02:18:32 +00:00
|
|
|
version = "0.3.16";
|
|
|
|
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}";
|
2021-12-21 02:18:32 +00:00
|
|
|
sha256 = "sha256-7waY5AOONi+u056JRH9KcoBWSB4AlMw4QcMW0uoCARc=";
|
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
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|