1{ lib 2, buildPythonPackage 3, fetchPypi 4, cffi 5, numpy 6, portaudio 7, substituteAll 8}: 9 10buildPythonPackage rec { 11 pname = "sounddevice"; 12 version = "0.3.11"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "0pfcbgbl77nggchxb2i5rb78m7hpgn65aqpz99yfx1fgfbmy9yg1"; 17 }; 18 19 propagatedBuildInputs = [ cffi numpy portaudio ]; 20 21 # No tests included nor upstream available. 22 doCheck = false; 23 24 patches = [ 25 (substituteAll { 26 src = ./fix-portaudio-library-path.patch; 27 portaudio = "${portaudio}/lib/libportaudio.so.2"; 28 }) 29 ]; 30 31 meta = { 32 description = "Play and Record Sound with Python"; 33 homepage = http://python-sounddevice.rtfd.org/; 34 license = with lib.licenses; [ mit ]; 35 maintainers = with lib.maintainers; [ fridh ]; 36 }; 37}