From 7bf227bd3206394ab5f9df29a341534dc7940011 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Feb 2026 14:51:28 +0000 Subject: [PATCH 1/2] python3Packages.numericalunits: use finalAttrs --- .../development/python-modules/numericalunits/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/numericalunits/default.nix b/pkgs/development/python-modules/numericalunits/default.nix index b4b463ddc5d8..93d5e2b8e545 100644 --- a/pkgs/development/python-modules/numericalunits/default.nix +++ b/pkgs/development/python-modules/numericalunits/default.nix @@ -6,7 +6,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "numericalunits"; version = "1.26"; pyproject = true; @@ -14,7 +14,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "sbyrnes321"; repo = "numericalunits"; - tag = "numericalunits-${version}"; + tag = "numericalunits-${finalAttrs.version}"; hash = "sha256-vPB1r+j+p9n+YLnBjHuk2t+QSr+adEOjyC45QSbeb4M="; }; @@ -26,6 +26,8 @@ buildPythonPackage rec { pytestCheckHook ]; + pythonImportsCheck = [ "numericalunits" ]; + enabledTestPaths = [ "tests/tests.py" ]; @@ -36,4 +38,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ nickcao ]; }; -} +}) From dc62a4e7733c61767ad360a0f6f023db707eba17 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Feb 2026 14:55:13 +0000 Subject: [PATCH 2/2] python3Packages.numericalunits: disable on python 3.14 --- pkgs/development/python-modules/numericalunits/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/numericalunits/default.nix b/pkgs/development/python-modules/numericalunits/default.nix index 93d5e2b8e545..b58fcf9cba67 100644 --- a/pkgs/development/python-modules/numericalunits/default.nix +++ b/pkgs/development/python-modules/numericalunits/default.nix @@ -1,6 +1,7 @@ { lib, buildPythonPackage, + pythonAtLeast, fetchFromGitHub, setuptools, pytestCheckHook, @@ -11,6 +12,9 @@ buildPythonPackage (finalAttrs: { version = "1.26"; pyproject = true; + # AttributeError: module 'ast' has no attribute 'Num' + disabled = pythonAtLeast "3.14"; + src = fetchFromGitHub { owner = "sbyrnes321"; repo = "numericalunits";