2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, pydantic
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioopenexchangerates";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.4.6";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MartinHjelmare";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "aioopenexchangerates";
|
2023-03-24 00:07:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-6lgjblCyc4NSnw+nlCH0SKV7f9aa4qcfa7v9pgzusKo=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-01-25 14:12:00 +00:00
|
|
|
--replace 'pydantic = "^1.9"' 'pydantic = "*"' \
|
2024-01-02 11:29:13 +00:00
|
|
|
--replace " --cov=aioopenexchangerates --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
aioresponses
|
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioopenexchangerates"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for the Openexchangerates API";
|
|
|
|
homepage = "https://github.com/MartinHjelmare/aioopenexchangerates";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/MartinHjelmare/aioopenexchangerates/blob/v${version}/CHANGELOG.md";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|