diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix b/nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix new file mode 100644 index 000000000000..853d01257740 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix @@ -0,0 +1,63 @@ +{ lib +, aiohttp +, async-timeout +, backports-zoneinfo +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytest-timeout +, pytestCheckHook +, pythonOlder +, python-dotenv +}: + +buildPythonPackage rec { + pname = "aiopvpc"; + version = "4.3.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "azogue"; + repo = "aiopvpc"; + rev = "refs/tags/v${version}"; + hash = "sha256-8CNmrE3EMFg/bCrdI+K/8f0MRzKtGI74ILFMuSg1Ivo="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail " --cov --cov-report term --cov-report html" "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ] ++ lib.optionals (pythonOlder "3.9") [ + backports-zoneinfo + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-timeout + pytestCheckHook + python-dotenv + ]; + + pythonImportsCheck = [ + "aiopvpc" + ]; + + meta = with lib; { + description = "Python module to download Spanish electricity hourly prices (PVPC)"; + homepage = "https://github.com/azogue/aiopvpc"; + changelog = "https://github.com/azogue/aiopvpc/blob/v${version}/CHANGELOG.md"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |