diff --git a/pkgs/development/python-modules/detectron2/default.nix b/pkgs/development/python-modules/detectron2/default.nix index 2a7fb8b7d9aa..d835135ee3a3 100644 --- a/pkgs/development/python-modules/detectron2/default.nix +++ b/pkgs/development/python-modules/detectron2/default.nix @@ -44,20 +44,18 @@ pytest-mock, pytestCheckHook, torchvision, + pythonAtLeast, }: -let +buildPythonPackage (finalAttrs: { pname = "detectron2"; version = "0.6"; -in -buildPythonPackage { - inherit pname version; pyproject = true; src = fetchFromGitHub { owner = "facebookresearch"; repo = "detectron2"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-TosuUZ1hJrXF3VGzsGO2hmQJitGUxe7FyZyKjNh+zPA="; }; @@ -188,6 +186,12 @@ buildPythonPackage { "test_apply_deltas_tracing" "test_imagelist_padding_tracing" "test_roi_pooler_tracing" + ] + ++ lib.optionals (pythonAtLeast "3.14") [ + # AttributeError: '...' object has no attribute '__annotations__' + "test_default_anchor_generator_centered" + "test_scriptability_cpu" + "test_scriptable_cpu" ]; pythonImportsCheck = [ "detectron2" ]; @@ -198,4 +202,4 @@ buildPythonPackage { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ happysalada ]; }; -} +})