summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-rtmidi/default.nix
blob: d86255baa42f8fab98fce2d4a6c4f63edbbcdc96 (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,
  stdenv,
  alabaster,
  alsa-lib,
  buildPythonPackage,
  cython,
  fetchPypi,
  flake8,
  libjack2,
  meson-python,
  ninja,
  pkg-config,
  tox,
  wheel,
}:

buildPythonPackage rec {
  pname = "python-rtmidi";
  version = "1.5.8";
  pyproject = true;

  src = fetchPypi {
    pname = "python_rtmidi";
    inherit version;
    hash = "sha256-f5reaLBorgkADstWKulSHaOiNDYa1USeg/xzRUTQBPo=";
  };

  nativeBuildInputs = [
    cython
    meson-python
    ninja
    pkg-config
    wheel
  ];

  buildInputs =
    [ ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
      libjack2
      alsa-lib
    ];

  nativeCheckInputs = [
    tox
    flake8
    alabaster
  ];

  pythonImportsCheck = [ "rtmidi" ];

  meta = {
    description = "Python binding for the RtMidi C++ library implemented using Cython";
    homepage = "https://github.com/SpotlightKid/python-rtmidi";
    changelog = "https://github.com/SpotlightKid/python-rtmidi/blob/${version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}