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