diff options
Diffstat (limited to 'pkgs/development/python-modules/aubio/default.nix')
-rw-r--r-- | pkgs/development/python-modules/aubio/default.nix | 58 |
1 files changed, 38 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/aubio/default.nix b/pkgs/development/python-modules/aubio/default.nix index b810544e4043b..88d2d9af34340 100644 --- a/pkgs/development/python-modules/aubio/default.nix +++ b/pkgs/development/python-modules/aubio/default.nix @@ -1,40 +1,58 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, numpy -, pytestCheckHook -, stdenv -, darwin +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + setuptools, + numpy, + pytestCheckHook, + stdenv, + darwin, }: buildPythonPackage rec { pname = "aubio"; version = "0.4.9"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { - owner = pname; - repo = pname; + owner = "aubio"; + repo = "aubio"; rev = version; - sha256 = "0fhxikvlr010nbh02g455d5y8bq6j5yw180cdh4gsd0hb43y3z26"; + hash = "sha256-RvzhB1kQNP0IbAygwH2RBi/kSyuFPAHgsiCATPeMHTo="; }; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Accelerate AudioToolbox CoreVideo CoreGraphics ]); - - propagatedBuildInputs = [ - numpy + 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="; + }) ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + buildInputs = lib.optionals stdenv.isDarwin ( + with darwin.apple_sdk.frameworks; + [ + Accelerate + AudioToolbox + CoreVideo + CoreGraphics + ] + ); + + build-system = [ setuptools ]; + + dependencies = [ numpy ]; + + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "aubio" ]; meta = with lib; { - description = "a library for audio and music analysis"; + description = "Library for audio and music analysis"; homepage = "https://aubio.org"; license = licenses.gpl3; - maintainers = with maintainers; [ ]; + maintainers = [ ]; }; } |