summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aubio-ledfx/default.nix
blob: 91a0842961f1e088742ac8336652b353f8e2737b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  ffmpeg-headless,
  libsamplerate,
  libsndfile,
  meson-python,
  numpy,
  pkg-config,
  pytestCheckHook,
  rubberband,
  setuptools,
  stdenv,
}:

buildPythonPackage (finalAttrs: {
  pname = "aubio-ledfx";
  version = "0.4.11";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "LedFx";
    repo = "aubio-ledfx";
    tag = "v${finalAttrs.version}";
    hash = "sha256-ec6QiTj1AOza+ggJPl3EULNDB/rrpCDZW0HaSywy/4E=";
  };

  build-system = [
    meson-python
    setuptools
  ];

  dependencies = [ numpy ];

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    libsamplerate
    libsndfile
  ]
  ++ lib.optionals stdenv.targetPlatform.isLinux [
    ffmpeg-headless
  ]
  ++ lib.optionals (!stdenv.targetPlatform.isLinux) [
    rubberband
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "aubio" ];

  meta = {
    description = "Collection of tools for music analysis";
    homepage = "https://github.com/LedFx/aubio-ledfx";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ SuperSandro2000 ];
  };
})