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