depot/third_party/nixpkgs/pkgs/development/python-modules/python-bsblan/default.nix
Default email ed0c4a69f0 Project import generated by Copybara.
GitOrigin-RevId: e3652e0735fbec227f342712f180f4f21f0594f2
2023-03-31 00:05:00 +02:00

65 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, packaging
, poetry-core
, pydantic
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, yarl
}:
buildPythonPackage rec {
pname = "python-bsblan";
version = "0.5.10";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "liudger";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-VOi3v5SPHHx+qgqQmbIcC+APAks9CPklFAlCmHRM1iQ=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
packaging
pydantic
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-mock
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"' \
--replace "--cov" ""
'';
pythonImportsCheck = [
"bsblan"
];
meta = with lib; {
description = "Module to control and monitor an BSBLan device programmatically";
homepage = "https://github.com/liudger/python-bsblan";
changelog = "https://github.com/liudger/python-bsblan/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}