From b9bb21e65e0e183fc1d2b526ed7c977c7c0b4a05 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 30 Dec 2024 17:47:26 +0100 Subject: [PATCH] python312Packages.habiticalib: init at 0.3.2 Library for the Habitica API https://github.com/tr4nt0r/habiticalib --- .../python-modules/habiticalib/default.nix | 71 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 73 insertions(+) create mode 100644 pkgs/development/python-modules/habiticalib/default.nix diff --git a/pkgs/development/python-modules/habiticalib/default.nix b/pkgs/development/python-modules/habiticalib/default.nix new file mode 100644 index 000000000000..459c7632be60 --- /dev/null +++ b/pkgs/development/python-modules/habiticalib/default.nix @@ -0,0 +1,71 @@ +{ + lib, + aiohttp, + aioresponses, + buildPythonPackage, + fetchFromGitHub, + habitipy, + hatch-regex-commit, + hatchling, + mashumaro, + orjson, + pillow, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, + pythonOlder, + syrupy, +}: + +buildPythonPackage rec { + pname = "habiticalib"; + version = "0.3.2"; + pyproject = true; + + disabled = pythonOlder "3.12"; + + src = fetchFromGitHub { + owner = "tr4nt0r"; + repo = "habiticalib"; + tag = "v${version}"; + hash = "sha256-gv0ZrjJPP2ZgBSt221Hjloksu4QE4Iqm1z36YN5p2GI="; + }; + + build-system = [ + hatch-regex-commit + hatchling + ]; + + dependencies = [ + aiohttp + habitipy + mashumaro + orjson + pillow + ]; + + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytest-cov-stub + pytestCheckHook + syrupy + ]; + + pytestFlagsArray = [ "--snapshot-update" ]; + + pythonImportsCheck = [ "habiticalib" ]; + + disabledTests = [ + # AssertionError + "test_generate_avatar" + ]; + + meta = { + description = "Library for the Habitica API"; + homepage = "https://github.com/tr4nt0r/habiticalib"; + changelog = "https://github.com/tr4nt0r/habiticalib/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 67e850576181..43ef40fbca83 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5740,6 +5740,8 @@ self: super: with self; { habitipy = callPackage ../development/python-modules/habitipy { }; + habiticalib = callPackage ../development/python-modules/habiticalib { }; + hachoir = callPackage ../development/python-modules/hachoir { }; hacking = callPackage ../development/python-modules/hacking { };