2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, stdenv
|
2021-06-28 23:13:55 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cffi
|
|
|
|
, pytestCheckHook
|
2022-06-16 17:23:12 +00:00
|
|
|
, AudioToolbox
|
|
|
|
, CoreAudio
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "miniaudio";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "1.51";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irmen";
|
|
|
|
repo = "pyminiaudio";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-nWx/1+b28/pvyTe8jSAOmw+vfzjuD7FFmVVUzH8DAyw=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
AudioToolbox
|
|
|
|
CoreAudio
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "miniaudio" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for the miniaudio library and its decoders";
|
|
|
|
homepage = "https://github.com/irmen/pyminiaudio";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|