2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
filterpy,
|
|
|
|
importlib-metadata,
|
|
|
|
numpy,
|
|
|
|
rich,
|
|
|
|
scipy,
|
|
|
|
motmetrics,
|
|
|
|
opencv4,
|
|
|
|
pytestCheckHook,
|
2024-02-07 01:22:34 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "norfair";
|
|
|
|
version = "2.2.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tryolabs";
|
|
|
|
repo = "norfair";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-aKB5TYSLW7FOXIy9u2hK7px6eEmIQdKPrhChKaU1uYs=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "rich" ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
filterpy
|
|
|
|
importlib-metadata
|
|
|
|
numpy
|
|
|
|
rich
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
metrics = [ motmetrics ];
|
|
|
|
video = [ opencv4 ];
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "norfair" ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Lightweight Python library for adding real-time multi-object tracking to any detector";
|
|
|
|
changelog = "https://github.com/tryolabs/norfair/releases/tag/v${version}";
|
|
|
|
homepage = "https://github.com/tryolabs/norfair";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fleaz ];
|
|
|
|
};
|
|
|
|
}
|