2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cffi
|
|
|
|
, numpy
|
|
|
|
, portaudio
|
|
|
|
, substituteAll
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sounddevice";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "0.3.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "028f6e5df83027f4bfba5d6d61e6d46eb8689f9e647825e09f539920dee17d2c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|