From e38f367e6a852d234a1ab952abf9142d348b9cde Mon Sep 17 00:00:00 2001 From: Harinn Date: Wed, 29 Jul 2026 22:06:43 +0700 Subject: [PATCH] python3Packages.udatetime: enable tests --- .../python-modules/udatetime/default.nix | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/udatetime/default.nix b/pkgs/development/python-modules/udatetime/default.nix index f49df8e4750e..ce8e20908c74 100644 --- a/pkgs/development/python-modules/udatetime/default.nix +++ b/pkgs/development/python-modules/udatetime/default.nix @@ -1,8 +1,9 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, setuptools, + pytestCheckHook, }: buildPythonPackage (finalAttrs: { @@ -12,16 +13,21 @@ buildPythonPackage (finalAttrs: { __structuredAttrs = true; - src = fetchPypi { - pname = "udatetime"; - inherit (finalAttrs) version; - hash = "sha256-sQvFVwaZpDinLitaZOdr2MKO4779FvIJOHpVB/oLgwE="; + src = fetchFromGitHub { + owner = "freach"; + repo = "udatetime"; + tag = finalAttrs.version; + hash = "sha256-1TGLdw8yq+FmdfKin2e9SKJTA1TDNmLXmKRWcq0qTnw="; }; build-system = [ setuptools ]; - # tests not included on pypi - doCheck = false; + nativeCheckInputs = [ pytestCheckHook ]; + + # shadows the installed package holding the compiled extension + preCheck = '' + rm -r udatetime + ''; pythonImportsCheck = [ "udatetime" ];