diff --git a/pkgs/development/python-modules/pvo/default.nix b/pkgs/development/python-modules/pvo/default.nix new file mode 100644 index 000000000000..84d6918199ce --- /dev/null +++ b/pkgs/development/python-modules/pvo/default.nix @@ -0,0 +1,61 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pydantic +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, yarl +}: + +buildPythonPackage rec { + pname = "pvo"; + version = "0.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "frenck"; + repo = "python-pvoutput"; + rev = "v${version}"; + sha256 = "sha256-m+6fCBPN0LG6HoRwefVVOGEjccoB8mCWJOlSNHxEErM="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + pydantic + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace "0.0.0" "${version}" \ + --replace "--cov" "" + ''; + + pythonImportsCheck = [ + "pvo" + ]; + + meta = with lib; { + description = "Python module to interact with the PVOutput API"; + homepage = "https://github.com/frenck/python-pvoutput"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98f72a8a7663..b3c4ab4ff1b7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6279,6 +6279,8 @@ in { pvlib = callPackage ../development/python-modules/pvlib { }; + pvo = callPackage ../development/python-modules/pvo { }; + Pweave = callPackage ../development/python-modules/pweave { }; pwntools = callPackage ../development/python-modules/pwntools {