1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytest 5, numpy 6, libsndfile 7, cffi 8, isPyPy 9, stdenv 10}: 11 12buildPythonPackage rec { 13 pname = "soundfile"; 14 version = "0.10.3.post1"; 15 16 src = fetchPypi { 17 pname = "SoundFile"; 18 inherit version; 19 sha256 = "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329"; 20 }; 21 22 checkInputs = [ pytest ]; 23 propagatedBuildInputs = [ numpy libsndfile cffi ]; 24 propagatedNativeBuildInputs = [ cffi ]; 25 26 meta = { 27 description = "An audio library based on libsndfile, CFFI and NumPy"; 28 license = lib.licenses.bsd3; 29 homepage = "https://github.com/bastibe/PySoundFile"; 30 maintainers = with lib.maintainers; [ fridh ]; 31 }; 32 33 postPatch = '' 34 substituteInPlace soundfile.py --replace "_find_library('sndfile')" "'${libsndfile.out}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}'" 35 ''; 36 37 # https://github.com/bastibe/PySoundFile/issues/157 38 disabled = isPyPy || stdenv.isi686; 39 40}