diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix | 58 |
1 files changed, 58 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..0b079e0d1a59 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix @@ -0,0 +1,58 @@ +{ lib +, aiohttp +, async-timeout +, backports-zoneinfo +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytest-timeout +, pytestCheckHook +, pythonOlder +, tzdata +}: + +buildPythonPackage rec { + pname = "aiopvpc"; + version = "2.1.2"; + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "azogue"; + repo = pname; + rev = "v${version}"; + sha256 = "0s8ki46dh39kw6qvsjcfcxa0gblyi33m3hry137kbi4lw5ws6qhr"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + backports-zoneinfo + tzdata + async-timeout + ]; + + checkInputs = [ + pytest-asyncio + pytest-timeout + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml --replace \ + " --cov --cov-report term --cov-report html" "" + ''; + + pythonImportsCheck = [ "aiopvpc" ]; + + meta = with lib; { + description = "Python module to download Spanish electricity hourly prices (PVPC)"; + homepage = "https://github.com/azogue/aiopvpc"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |