2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-09-25 04:45:31 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, cffi
|
|
|
|
, numpy
|
|
|
|
, portaudio
|
|
|
|
, substituteAll
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sounddevice";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "0.4.3";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = isPy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "f1667a7467b65fac4c4ebf668b4e9698eb7333fc3d32bc3c7ec9839ea7cb6c20";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cffi numpy portaudio ];
|
|
|
|
|
|
|
|
# No tests included nor upstream available.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
pythonImportsCheck = [ "sounddevice" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|