Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 isPy27, 7 cffi, 8 numpy, 9 portaudio, 10 substituteAll, 11}: 12 13buildPythonPackage rec { 14 pname = "sounddevice"; 15 version = "0.4.7"; 16 format = "setuptools"; 17 disabled = isPy27; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-abOGgY1QotUYYH1LlzRC6NUkdgx81si4vgPYyY/EvOc="; 22 }; 23 24 propagatedBuildInputs = [ 25 cffi 26 numpy 27 portaudio 28 ]; 29 30 # No tests included nor upstream available. 31 doCheck = false; 32 33 pythonImportsCheck = [ "sounddevice" ]; 34 35 patches = [ 36 (substituteAll { 37 src = ./fix-portaudio-library-path.patch; 38 portaudio = "${portaudio}/lib/libportaudio${stdenv.hostPlatform.extensions.sharedLibrary}"; 39 }) 40 ]; 41 42 meta = { 43 description = "Play and Record Sound with Python"; 44 homepage = "http://python-sounddevice.rtfd.org/"; 45 license = with lib.licenses; [ mit ]; 46 }; 47}