depot/third_party/nixpkgs/pkgs/development/python-modules/aiowithings/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

60 lines
1.1 KiB
Nix

{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, syrupy
, yarl
}:
buildPythonPackage rec {
pname = "aiowithings";
version = "2.1.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "joostlek";
repo = "python-withings";
rev = "refs/tags/v${version}";
hash = "sha256-+pIIVCR+QsW9M3pH9Ss3dMvkeKM1OdhQ1y+s/T6pHtk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
yarl
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [
"aiowithings"
];
meta = with lib; {
description = "Module to interact with Withings";
homepage = "https://github.com/joostlek/python-withings";
changelog = "https://github.com/joostlek/python-withings/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}