From 42d5a17427c4ad785f429e8f98cb3c144877ccae Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 May 2026 21:49:48 +0200 Subject: [PATCH 1/2] python3Packages.python-datemath: disable failing test --- pkgs/development/python-modules/python-datemath/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/python-datemath/default.nix b/pkgs/development/python-modules/python-datemath/default.nix index b13b600121ae..c72487808714 100644 --- a/pkgs/development/python-modules/python-datemath/default.nix +++ b/pkgs/development/python-modules/python-datemath/default.nix @@ -35,6 +35,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "datemath" ]; + disabledTests = [ + # Test relies on timezone data that may not be present in the test environment + "testTimezone" + ]; + meta = { description = "Python module to emulate the date math used in SOLR and Elasticsearch"; homepage = "https://github.com/nickmaccarthy/python-datemath"; From 9c19757fc28e3104ab609939c59294bfd65218d7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 May 2026 21:50:46 +0200 Subject: [PATCH 2/2] python3Packages.python-datemath: migrate to finalAttrs --- .../python-modules/python-datemath/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/python-datemath/default.nix b/pkgs/development/python-modules/python-datemath/default.nix index c72487808714..513750e533de 100644 --- a/pkgs/development/python-modules/python-datemath/default.nix +++ b/pkgs/development/python-modules/python-datemath/default.nix @@ -9,7 +9,7 @@ setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "python-datemath"; version = "3.0.3"; pyproject = true; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "nickmaccarthy"; repo = "python-datemath"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-VwdY6Gmbmoy7EKZjUlWj56uSiE0OdegPiQv+rmigkq8="; }; @@ -43,8 +43,8 @@ buildPythonPackage rec { meta = { description = "Python module to emulate the date math used in SOLR and Elasticsearch"; homepage = "https://github.com/nickmaccarthy/python-datemath"; - changelog = "https://github.com/nickmaccarthy/python-datemath/blob/v${version}/CHANGELOG.md"; - license = with lib.licenses; [ asl20 ]; + changelog = "https://github.com/nickmaccarthy/python-datemath/blob/v${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.asl20; maintainers = with lib.maintainers; [ fab ]; }; -} +})