2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, defusedxml
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, respx
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sfrbox-api";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.0.6";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hacf-fr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-1Jn785e4aLd83EHjkgB90sWi9No8wqCjUEn4ecyVl4o=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'pydantic = ">=1.10.2"' 'pydantic = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
defusedxml
|
|
|
|
httpx
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
respx
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"sfrbox_api"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for the SFR Box API";
|
|
|
|
homepage = "https://github.com/hacf-fr/sfrbox-api";
|
|
|
|
changelog = "https://github.com/hacf-fr/sfrbox-api/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|