diff --git a/pkgs/development/python-modules/opensensemap-api/default.nix b/pkgs/development/python-modules/opensensemap-api/default.nix index 7ef381c25fcb..76a0cf10036a 100644 --- a/pkgs/development/python-modules/opensensemap-api/default.nix +++ b/pkgs/development/python-modules/opensensemap-api/default.nix @@ -4,27 +4,34 @@ async-timeout, buildPythonPackage, fetchFromGitHub, + hatchling, + pytest-asyncio, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "opensensemap-api"; - version = "0.3.2"; - format = "setuptools"; + version = "0.4.1"; + pyproject = true; src = fetchFromGitHub { owner = "home-assistant-ecosystem"; repo = "python-opensensemap-api"; - tag = version; - hash = "sha256-iUSdjU41JOT7k044EI2XEvJiSo6V4mO6S51EcIughEM="; + tag = finalAttrs.version; + hash = "sha256-cCvKgB2tdYZw7it8YAtZZgsQrGUQKGNLqWiERKDCMVw="; }; - propagatedBuildInputs = [ + build-system = [ hatchling ]; + + dependencies = [ aiohttp async-timeout ]; - # Module has no tests - doCheck = false; + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; pythonImportsCheck = [ "opensensemap_api" ]; @@ -35,8 +42,8 @@ buildPythonPackage rec { available information from the sensor can be retrieved. ''; homepage = "https://github.com/home-assistant-ecosystem/python-opensensemap-api"; - changelog = "https://github.com/home-assistant-ecosystem/python-opensensemap-api/releases/tag/${version}"; - license = with lib.licenses; [ mit ]; + changelog = "https://github.com/home-assistant-ecosystem/python-opensensemap-api/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; }; -} +})