{ lib , buildPythonPackage , fetchPypi , isPy27 , cffi , numpy , portaudio , substituteAll }: buildPythonPackage rec { pname = "sounddevice"; version = "0.4.1"; disabled = isPy27; src = fetchPypi { inherit pname version; sha256 = "f21978921186c0c7183af032fab77b735d824f3e926d76adb3fd0912e289ce0b"; }; propagatedBuildInputs = [ cffi numpy portaudio ]; # No tests included nor upstream available. doCheck = false; patches = [ (substituteAll { src = ./fix-portaudio-library-path.patch; portaudio = "${portaudio}/lib/libportaudio.so.2"; }) ]; meta = { description = "Play and Record Sound with Python"; homepage = "http://python-sounddevice.rtfd.org/"; license = with lib.licenses; [ mit ]; maintainers = with lib.maintainers; [ fridh ]; }; }