2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-06-20 14:57:18 +00:00
|
|
|
fetchpatch,
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
stdenv,
|
|
|
|
darwin,
|
2020-10-19 00:13:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aubio";
|
|
|
|
version = "0.4.9";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-05-15 15:35:15 +00:00
|
|
|
owner = "aubio";
|
|
|
|
repo = "aubio";
|
2020-10-19 00:13:06 +00:00
|
|
|
rev = version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-RvzhB1kQNP0IbAygwH2RBi/kSyuFPAHgsiCATPeMHTo=";
|
2020-10-19 00:13:06 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# fix "incompatible function pointer types initializing 'PyUFuncGenericFunction'"
|
|
|
|
name = "const-function-signature.patch";
|
|
|
|
url = "https://github.com/aubio/aubio/commit/95ff046c698156f21e2ca0d1d8a02c23ab76969f.patch";
|
|
|
|
hash = "sha256-qKcIPjpcZUizSN/t96WOiOn+IlsrlC0+g7gW77KejH0=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin (
|
|
|
|
with darwin.apple_sdk.frameworks;
|
|
|
|
[
|
|
|
|
Accelerate
|
|
|
|
AudioToolbox
|
|
|
|
CoreVideo
|
|
|
|
CoreGraphics
|
|
|
|
]
|
|
|
|
);
|
2021-12-21 02:18:32 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [ numpy ];
|
2020-10-19 00:13:06 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "aubio" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for audio and music analysis";
|
2020-10-19 00:13:06 +00:00
|
|
|
homepage = "https://aubio.org";
|
|
|
|
license = licenses.gpl3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-10-19 00:13:06 +00:00
|
|
|
};
|
|
|
|
}
|