at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 decorator, 7 numpy, 8 scipy, 9 matplotlib, 10 pytestCheckHook, 11 pytest-cov-stub, 12 pytest-mpl, 13}: 14 15buildPythonPackage rec { 16 pname = "mir-eval"; 17 version = "0.8.2"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "mir-evaluation"; 22 repo = "mir_eval"; 23 tag = version; 24 hash = "sha256-Dq/kqoTY8YGATsr6MSgfQxkWvFpmH/Pf1pKBLPApylY="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 decorator 31 numpy 32 scipy 33 ]; 34 35 optional-dependencies.display = [ matplotlib ]; 36 37 nativeCheckInputs = [ 38 pytestCheckHook 39 pytest-cov-stub 40 pytest-mpl 41 ] 42 ++ lib.flatten (lib.attrValues optional-dependencies); 43 44 preCheck = '' 45 pushd tests 46 ''; 47 48 postCheck = '' 49 popd 50 ''; 51 52 pythonImportsCheck = [ "mir_eval" ]; 53 54 meta = with lib; { 55 description = "Common metrics for common audio/music processing tasks"; 56 homepage = "https://github.com/craffel/mir_eval"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ carlthome ]; 59 }; 60}