diff --git a/pkgs/development/python-modules/pyannote-metrics/default.nix b/pkgs/development/python-modules/pyannote-metrics/default.nix index f5623e28b440..27d825a2859c 100644 --- a/pkgs/development/python-modules/pyannote-metrics/default.nix +++ b/pkgs/development/python-modules/pyannote-metrics/default.nix @@ -1,19 +1,20 @@ { lib, buildPythonPackage, + docopt, fetchFromGitHub, - setuptools, - wheel, + matplotlib, + numpy, + pandas, pyannote-core, pyannote-database, - pandas, - scipy, + pythonOlder, scikit-learn, - docopt, - tabulate, - matplotlib, + scipy, + setuptools, sympy, - numpy, + tabulate, + versioneer, }: buildPythonPackage rec { @@ -21,14 +22,26 @@ buildPythonPackage rec { version = "3.2.1"; pyproject = true; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "pyannote"; repo = "pyannote-metrics"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-V4qyaCaFsoikfFILm2sccf6m7lqJSDTdLxS1sr/LXAY="; }; - propagatedBuildInputs = [ + postPatch = '' + # Remove vendorized versioneer.py + rm versioneer.py + ''; + + build-system = [ + setuptools + versioneer + ]; + + dependencies = [ pyannote-core pyannote-database pandas @@ -41,18 +54,14 @@ buildPythonPackage rec { numpy ]; - nativeBuildInputs = [ - setuptools - wheel - ]; - pythonImportsCheck = [ "pyannote.metrics" ]; meta = with lib; { description = "A toolkit for reproducible evaluation, diagnostic, and error analysis of speaker diarization systems"; - mainProgram = "pyannote-metrics"; homepage = "https://github.com/pyannote/pyannote-metrics"; + changelog = "http://pyannote.github.io/pyannote-metrics/changelog.html"; license = licenses.mit; maintainers = with maintainers; [ ]; + mainProgram = "pyannote-metrics"; }; }