3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/sounddevice/default.nix
2022-08-23 22:26:04 +02:00

43 lines
894 B
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, isPy27
, cffi
, numpy
, portaudio
, substituteAll
}:
buildPythonPackage rec {
pname = "sounddevice";
version = "0.4.5";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-L+DUEpnk8wN9rSrO3k7/BmazSh+j2lM15HEgNzlkvvU=";
};
propagatedBuildInputs = [ cffi numpy portaudio ];
# No tests included nor upstream available.
doCheck = false;
pythonImportsCheck = [ "sounddevice" ];
patches = [
(substituteAll {
src = ./fix-portaudio-library-path.patch;
portaudio = "${portaudio}/lib/libportaudio${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
meta = {
description = "Play and Record Sound with Python";
homepage = "http://python-sounddevice.rtfd.org/";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fridh ];
};
}