From 4dcbb0c6ada0223f73fa91bed4d679c6da5c8ef3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Sep 2025 21:35:46 +0200 Subject: [PATCH] python313Packages.orgparse: re-work --- .../python-modules/orgparse/default.nix | 50 +++++++++++++++---- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/orgparse/default.nix b/pkgs/development/python-modules/orgparse/default.nix index 025f607958f8..2ee36ebbb55b 100644 --- a/pkgs/development/python-modules/orgparse/default.nix +++ b/pkgs/development/python-modules/orgparse/default.nix @@ -1,26 +1,54 @@ { lib, - setuptools-scm, - fetchPypi, buildPythonPackage, + fetchFromGitHub, + hatchling, + hatch-vcs, + pytestCheckHook, }: buildPythonPackage rec { pname = "orgparse"; version = "0.4.20250520"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-ZHL9Ft3Ku1I5GFBchlJjq/oFrIC1k+ZooInNopGxot4="; - }; - - nativeBuildInputs = [ setuptools-scm ]; - pyproject = true; + src = fetchFromGitHub { + owner = "karlicoss"; + repo = "orgparse"; + tag = "v${version}"; + hash = "sha256-y3mkGCZvikbmymgvPOWq4GLxoFmslXGm/cxR2PZ6DRM="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "orgparse" ]; + + preCheck = '' + rm conftest.py + ''; + + disabledTestPaths = [ + # Ignoring doc folder + "doc/" + ]; + + disabledTests = [ + # AssertionError + "test_data[01_attributes]" + "test_data[03_repeated_tasks]" + "test_data[04_logbook]" + "test_level_0_timestamps" + ]; + meta = with lib; { + description = "Emacs org-mode parser in Python"; homepage = "https://github.com/karlicoss/orgparse"; - description = "Orgparse - Emacs org-mode parser in Python"; + changelog = "https://github.com/karlicoss/orgparse/releases/tag/${src.tag}"; license = licenses.bsd2; maintainers = with maintainers; [ twitchy0 ]; };