depot/third_party/nixpkgs/pkgs/development/libraries/libremidi/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

44 lines
835 B
Nix

{ alsa-lib
, cmake
, CoreAudio
, CoreFoundation
, CoreMIDI
, CoreServices
, fetchFromGitHub
, lib
, stdenv
}:
stdenv.mkDerivation rec {
pname = "libremidi";
version = "4.4.0";
src = fetchFromGitHub {
owner = "jcelerier";
repo = "libremidi";
rev = "v${version}";
hash = "sha256-raVBJ75/UmM3P69s8VNUXRE/2jV4WqPIfI4eXaf6UEg=";
};
nativeBuildInputs = [ cmake ];
buildInputs = lib.optional stdenv.isLinux alsa-lib
++ lib.optionals stdenv.isDarwin [
CoreAudio
CoreFoundation
CoreMIDI
CoreServices
];
postInstall = ''
cp -r $src/include $out
'';
meta = {
description = "Modern C++ MIDI real-time & file I/O library";
homepage = "https://github.com/jcelerier/libremidi";
maintainers = [ ];
license = lib.licenses.bsd2;
platforms = lib.platforms.all;
};
}