nixpkgs/pkgs/development/python-modules/mir-eval/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

60 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
decorator,
numpy,
scipy,
matplotlib,
pytestCheckHook,
pytest-cov-stub,
pytest-mpl,
}:
buildPythonPackage rec {
pname = "mir-eval";
version = "0.8.2";
pyproject = true;
src = fetchFromGitHub {
owner = "mir-evaluation";
repo = "mir_eval";
tag = version;
hash = "sha256-Dq/kqoTY8YGATsr6MSgfQxkWvFpmH/Pf1pKBLPApylY=";
};
build-system = [ setuptools ];
dependencies = [
decorator
numpy
scipy
];
optional-dependencies.display = [ matplotlib ];
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
pytest-mpl
]
++ lib.concatAttrValues optional-dependencies;
preCheck = ''
pushd tests
'';
postCheck = ''
popd
'';
pythonImportsCheck = [ "mir_eval" ];
meta = {
description = "Common metrics for common audio/music processing tasks";
homepage = "https://github.com/craffel/mir_eval";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ carlthome ];
};
}