depot/third_party/nixpkgs/pkgs/development/python-modules/subarulink/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

60 lines
1.1 KiB
Nix

{ lib
, aiohttp
, asynctest
, buildPythonPackage
, cryptography
, fetchFromGitHub
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, stdiomask
}:
buildPythonPackage rec {
pname = "subarulink";
version = "0.4.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "G-Two";
repo = pname;
rev = "v${version}";
sha256 = "sha256-EI7m2SFa1eAtncMA0g1OmXumzub4UvE6ssGfUGtLO2Q=";
};
propagatedBuildInputs = [
aiohttp
stdiomask
];
checkInputs = [
asynctest
cryptography
pytest-asyncio
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=subarulink" ""
'';
__darwinAllowLocalNetworking = true;
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [
"subarulink"
];
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 ];
};
}