diff --git a/pkgs/development/python-modules/afsapi/default.nix b/pkgs/development/python-modules/afsapi/default.nix index f32e4b74b259..685c161e80bf 100644 --- a/pkgs/development/python-modules/afsapi/default.nix +++ b/pkgs/development/python-modules/afsapi/default.nix @@ -3,29 +3,33 @@ aiohttp, buildPythonPackage, fetchFromGitHub, - lxml, + hatchling, + hatch-vcs, + defusedxml, pytest-aiohttp, pytestCheckHook, - setuptools-scm, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "afsapi"; - version = "0.3.1"; - format = "setuptools"; + version = "1.0.0"; + pyproject = true; src = fetchFromGitHub { owner = "wlcrs"; repo = "python-afsapi"; - tag = version; - hash = "sha256-WkkRsXRJ4i3lUn3X94YX7ZqfaKE2GgrBycbflnnlC74="; + tag = finalAttrs.version; + hash = "sha256-5gvA3rFyAlTx7oKrUq9q0lBuwatzMPvRhjy7GYnwdik="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ + hatchling + hatch-vcs + ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp - lxml + defusedxml ]; doCheck = false; # Failed: async def functions are not natively supported. @@ -40,10 +44,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "afsapi" ]; meta = { + changelog = "https://github.com/wlcrs/python-afsapi/releases/tag/${finalAttrs.version}"; description = "Python implementation of the Frontier Silicon API"; homepage = "https://github.com/wlcrs/python-afsapi"; - changelog = "https://github.com/wlcrs/python-afsapi/releases/tag/${version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ fab ]; }; -} +})