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