depot/third_party/nixpkgs/pkgs/development/python-modules/python-bsblan/default.nix
Default email c7f94ff3ce Project import generated by Copybara.
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
2023-08-22 22:05:09 +02:00

67 lines
1.3 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.12";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "liudger";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-ftu79SnVa7wOMx/RiRBDPmmG7Mmw84r30G4yDzBea2k=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"' \
--replace "--cov" ""
sed -i "/covdefaults/d" pyproject.toml
sed -i "/ruff/d" pyproject.toml
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
packaging
pydantic
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-mock
pytestCheckHook
];
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 ];
};
}