depot/third_party/nixpkgs/pkgs/development/python-modules/rtmidi-python/default.nix
Default email 871149a62e Project import generated by Copybara.
GitOrigin-RevId: 7f9b6e2babf232412682c09e57ed666d8f84ac2d
2022-02-21 09:47:16 +01:00

49 lines
888 B
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, cython
, alsa-lib
, CoreAudio
, CoreMIDI
, CoreServices
}:
buildPythonPackage rec {
pname = "rtmidi-python";
version = "0.2.2";
src = fetchPypi {
inherit pname version;
sha256 = "1wpcaxfpbmsjc78g8841kpixr0a3v6zn0ak058s3mm25kcysp4m0";
};
postPatch = ''
rm rtmidi_python.cpp
'';
nativeBuildInputs = [ cython ];
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib
] ++ lib.optionals stdenv.isDarwin [
CoreAudio
CoreMIDI
CoreServices
];
setupPyBuildFlags = [ "--from-cython" ];
# package has no tests
doCheck = false;
pythonImportsCheck = [
"rtmidi_python"
];
meta = with lib; {
description = "Python wrapper for RtMidi";
homepage = "https://github.com/superquadratic/rtmidi-python";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}