rtmidi-python: fix build on darwin

This commit is contained in:
Zhong Jianxin 2022-02-16 17:12:31 +08:00
parent e5fbe6ad90
commit 0fe995af20
2 changed files with 20 additions and 3 deletions

View File

@ -1,4 +1,13 @@
{ lib, buildPythonPackage, fetchPypi, cython, alsa-lib }:
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, cython
, alsa-lib
, CoreAudio
, CoreMIDI
, CoreServices
}:
buildPythonPackage rec {
pname = "rtmidi-python";
@ -14,7 +23,13 @@ buildPythonPackage rec {
'';
nativeBuildInputs = [ cython ];
buildInputs = [ alsa-lib ];
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib
] ++ lib.optionals stdenv.isDarwin [
CoreAudio
CoreMIDI
CoreServices
];
setupPyBuildFlags = [ "--from-cython" ];

View File

@ -8777,7 +8777,9 @@ in {
rstcheck = callPackage ../development/python-modules/rstcheck { };
rtmidi-python = callPackage ../development/python-modules/rtmidi-python { };
rtmidi-python = callPackage ../development/python-modules/rtmidi-python {
inherit (pkgs.darwin.apple_sdk.frameworks) CoreAudio CoreMIDI CoreServices;
};
rtoml = callPackage ../development/python-modules/rtoml { };