40 lines
813 B
Nix
40 lines
813 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy27
|
|
, cffi
|
|
, numpy
|
|
, portaudio
|
|
, substituteAll
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sounddevice";
|
|
version = "0.4.0";
|
|
disabled = isPy27;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "007cfef077c447eebbdbca3d510ca4365c211c2c6c4d2912d6eec43c8cbcbc02";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|