1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 filterpy, 7 importlib-metadata, 8 numpy, 9 rich, 10 scipy, 11 motmetrics, 12 opencv4, 13 pytestCheckHook, 14}: 15 16buildPythonPackage rec { 17 pname = "norfair"; 18 version = "2.3.0"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "tryolabs"; 23 repo = "norfair"; 24 tag = "v${version}"; 25 hash = "sha256-3a9Z4mbmqmSnOD69RAcKSX6N7vdDU5F/xgsEURnzIR0="; 26 }; 27 28 build-system = [ poetry-core ]; 29 30 pythonRelaxDeps = [ 31 "numpy" 32 "rich" 33 ]; 34 35 dependencies = [ 36 filterpy 37 importlib-metadata 38 numpy 39 rich 40 scipy 41 ]; 42 43 optional-dependencies = { 44 metrics = [ motmetrics ]; 45 video = [ opencv4 ]; 46 }; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 pythonImportsCheck = [ "norfair" ]; 51 52 meta = with lib; { 53 description = "Lightweight Python library for adding real-time multi-object tracking to any detector"; 54 changelog = "https://github.com/tryolabs/norfair/releases/tag/${src.tag}"; 55 homepage = "https://github.com/tryolabs/norfair"; 56 license = licenses.bsd3; 57 maintainers = with maintainers; [ fleaz ]; 58 }; 59}