nixpkgs/pkgs/development/python-modules/aioopenexchangerates/default.nix

59 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aioresponses
, pydantic
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aioopenexchangerates";
version = "0.4.2";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "MartinHjelmare";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Ykbw/s932XXX3qWutWUOLV1O9MMgBWPJNveKG8SDhWY=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pydantic
];
nativeCheckInputs = [
aioresponses
pytest-aiohttp
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=aioopenexchangerates --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"aioopenexchangerates"
];
meta = with lib; {
description = "Library for the Openexchangerates API";
homepage = "https://github.com/MartinHjelmare/aioopenexchangerates";
changelog = "https://github.com/MartinHjelmare/aioopenexchangerates/blob/vv${version}/CHANGELOG.md";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}