1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, isPy27
6, pkg-config
7, alsa-lib
8, libjack2
9, tox
10, flake8
11, alabaster
12, CoreAudio
13, CoreMIDI
14, CoreServices
15}:
16
17buildPythonPackage rec {
18 pname = "python-rtmidi";
19 version = "1.4.9";
20 disabled = isPy27;
21
22 src = fetchPypi {
23 inherit pname version;
24 sha256 = "bfeb4ed99d0cccf6fa2837566907652ded7adc1c03b69f2160c9de4082301302";
25 };
26
27 nativeBuildInputs = [ pkg-config ];
28 buildInputs = [
29 libjack2
30 ] ++ lib.optionals stdenv.isLinux [
31 alsa-lib
32 ] ++ lib.optionals stdenv.isDarwin [
33 CoreAudio
34 CoreMIDI
35 CoreServices
36 ];
37 checkInputs = [
38 tox
39 flake8
40 alabaster
41 ];
42
43 meta = with lib; {
44 description = "A Python binding for the RtMidi C++ library implemented using Cython";
45 homepage = "https://chrisarndt.de/projects/python-rtmidi/";
46 license = licenses.mit;
47 maintainers = with maintainers; [ hexa ];
48 };
49}