diff options
Diffstat (limited to 'pkgs/development/python-modules/librosa/default.nix')
-rw-r--r-- | pkgs/development/python-modules/librosa/default.nix | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix index fa99efb4f66ce..2c9e2447e33c1 100644 --- a/pkgs/development/python-modules/librosa/default.nix +++ b/pkgs/development/python-modules/librosa/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch2, # build-system setuptools, @@ -34,7 +35,7 @@ buildPythonPackage rec { pname = "librosa"; - version = "0.10.2"; + version = "0.10.2.post1"; format = "pyproject"; src = fetchFromGitHub { @@ -42,11 +43,20 @@ buildPythonPackage rec { repo = "librosa"; rev = "refs/tags/${version}"; fetchSubmodules = true; # for test data - hash = "sha256-zUKljPKWOhyb3Zv4KEUcvLsVkxVhL+rzErKycAl6jIg="; + hash = "sha256-0FbKVAFWmcFTW2dR27nif6hPZeIxFWYF1gTm4BEJZ/Q="; }; nativeBuildInputs = [ setuptools ]; + patches = [ + (fetchpatch2 { + # https://github.com/librosa/librosa/issues/1849 + name = "librosa-scipy-1.14-compat.patch"; + url = "https://github.com/librosa/librosa/commit/d0a12c87cdff715ffb8ac1c7383bba1031aa71e4.patch"; + hash = "sha256-NHuGo4U1FRikb5OIkycQBvuZ+0OdG/VykTcuhXkLUug="; + }) + ]; + postPatch = '' substituteInPlace setup.cfg \ --replace-fail "--cov-report term-missing --cov librosa --cov-report=xml " "" @@ -68,7 +78,7 @@ buildPythonPackage rec { typing-extensions ]; - passthru.optional-dependencies.matplotlib = [ matplotlib ]; + optional-dependencies.matplotlib = [ matplotlib ]; # check that import works, this allows to capture errors like https://github.com/librosa/librosa/issues/1160 pythonImportsCheck = [ "librosa" ]; @@ -80,7 +90,7 @@ buildPythonPackage rec { pytestCheckHook resampy samplerate - ] ++ passthru.optional-dependencies.matplotlib; + ] ++ optional-dependencies.matplotlib; preCheck = '' export HOME=$TMPDIR @@ -96,7 +106,7 @@ buildPythonPackage rec { "test_cite_badversion" "test_cite_unreleased" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # crashing the python interpreter "test_unknown_time_unit" "test_unknown_wavaxis" |