1{ lib
2, aiohttp
3, aioresponses
4, pydantic
5, buildPythonPackage
6, fetchFromGitHub
7, poetry-core
8, pytest-aiohttp
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "aioopenexchangerates";
15 version = "0.4.4";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "MartinHjelmare";
22 repo = "aioopenexchangerates";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-Wts2qVTZFTLR2Ru3bSiobGOyegiNoGl3xOrZdDRh7iU=";
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace " --cov=aioopenexchangerates --cov-report=term-missing:skip-covered" ""
30 '';
31
32 nativeBuildInputs = [
33 poetry-core
34 ];
35
36 propagatedBuildInputs = [
37 aiohttp
38 pydantic
39 ];
40
41 nativeCheckInputs = [
42 aioresponses
43 pytest-aiohttp
44 pytestCheckHook
45 ];
46
47 pythonImportsCheck = [
48 "aioopenexchangerates"
49 ];
50
51 meta = with lib; {
52 description = "Library for the Openexchangerates API";
53 homepage = "https://github.com/MartinHjelmare/aioopenexchangerates";
54 changelog = "https://github.com/MartinHjelmare/aioopenexchangerates/blob/v${version}/CHANGELOG.md";
55 license = with licenses; [ asl20 ];
56 maintainers = with maintainers; [ fab ];
57 };
58}