about summary refs log tree commit diff
path: root/pkgs/development/python-modules/librosa/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/librosa/default.nix')
-rw-r--r--pkgs/development/python-modules/librosa/default.nix126
1 files changed, 60 insertions, 66 deletions
diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix
index 62d712aa7b1f3..fa99efb4f66ce 100644
--- a/pkgs/development/python-modules/librosa/default.nix
+++ b/pkgs/development/python-modules/librosa/default.nix
@@ -1,40 +1,40 @@
-{ lib
-, stdenv
-, buildPythonPackage
-, fetchFromGitHub
-, fetchpatch
-
-# build-system
-, setuptools
-
-# runtime
-, audioread
-, decorator
-, joblib
-, lazy-loader
-, matplotlib
-, msgpack
-, numba
-, numpy
-, pooch
-, scikit-learn
-, scipy
-, soundfile
-, soxr
-, typing-extensions
-
-# tests
-, ffmpeg-headless
-, packaging
-, pytest-mpl
-, pytestCheckHook
-, resampy
-, samplerate
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  fetchFromGitHub,
+
+  # build-system
+  setuptools,
+
+  # runtime
+  audioread,
+  decorator,
+  joblib,
+  lazy-loader,
+  matplotlib,
+  msgpack,
+  numba,
+  numpy,
+  pooch,
+  scikit-learn,
+  scipy,
+  soundfile,
+  soxr,
+  typing-extensions,
+
+  # tests
+  ffmpeg-headless,
+  packaging,
+  pytest-mpl,
+  pytestCheckHook,
+  resampy,
+  samplerate,
 }:
 
 buildPythonPackage rec {
   pname = "librosa";
-  version = "0.10.1";
+  version = "0.10.2";
   format = "pyproject";
 
   src = fetchFromGitHub {
@@ -42,26 +42,14 @@ buildPythonPackage rec {
     repo = "librosa";
     rev = "refs/tags/${version}";
     fetchSubmodules = true; # for test data
-    hash = "sha256-zbmU87hI9A1CVcBZ/5FU8z0t6SS4jfJk9bj9kLe/EHI=";
+    hash = "sha256-zUKljPKWOhyb3Zv4KEUcvLsVkxVhL+rzErKycAl6jIg=";
   };
 
-  nativeBuildInputs = [
-    setuptools
-  ];
-
-  patches = [
-    (fetchpatch {
-      # https://github.com/librosa/librosa/issues/1754
-      # https://github.com/librosa/librosa/pull/1755
-      name = "matplotlib-3.8-compat.patch";
-      url = "https://github.com/librosa/librosa/commit/beef47885ce1255b43b65e48ea2054ddace37c6c.patch";
-      hash = "sha256-rrnlUHXHY2me4BWGs3wFq8WJmz75CbXTWKFp3VdJKzE=";
-    })
-  ];
+  nativeBuildInputs = [ setuptools ];
 
   postPatch = ''
     substituteInPlace setup.cfg \
-      --replace "--cov-report term-missing --cov librosa --cov-report=xml " ""
+      --replace-fail "--cov-report term-missing --cov librosa --cov-report=xml " ""
   '';
 
   propagatedBuildInputs = [
@@ -80,14 +68,10 @@ buildPythonPackage rec {
     typing-extensions
   ];
 
-  passthru.optional-dependencies.matplotlib = [
-    matplotlib
-  ];
+  passthru.optional-dependencies.matplotlib = [ matplotlib ];
 
   # check that import works, this allows to capture errors like https://github.com/librosa/librosa/issues/1160
-  pythonImportsCheck = [
-    "librosa"
-  ];
+  pythonImportsCheck = [ "librosa" ];
 
   nativeCheckInputs = [
     ffmpeg-headless
@@ -102,17 +86,28 @@ buildPythonPackage rec {
     export HOME=$TMPDIR
   '';
 
-  disabledTests = [
-    # requires network access
-    "test_example"
-    "test_example_info"
-    "test_load_resample"
-    # does not converge
-    "test_nnls_vector"
-  ] ++ lib.optionals stdenv.isDarwin [
-    # https://github.com/librosa/librosa/pull/1808
-    "test_pyin_multi_center"
-  ];
+  disabledTests =
+    [
+      # requires network access
+      "test_example"
+      "test_example_info"
+      "test_load_resample"
+      "test_cite_released"
+      "test_cite_badversion"
+      "test_cite_unreleased"
+    ]
+    ++ lib.optionals stdenv.isDarwin [
+      # crashing the python interpreter
+      "test_unknown_time_unit"
+      "test_unknown_wavaxis"
+      "test_waveshow_unknown_wavaxis"
+      "test_waveshow_bad_maxpoints"
+      "test_waveshow_deladaptor"
+      "test_waveshow_disconnect"
+      "test_unknown_axis"
+      "test_axis_bound_warning"
+      "test_auto_aspect"
+    ];
 
   meta = with lib; {
     description = "Python library for audio and music analysis";
@@ -121,5 +116,4 @@ buildPythonPackage rec {
     license = licenses.isc;
     maintainers = with maintainers; [ GuillaumeDesforges ];
   };
-
 }