about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libremidi/default.nix
blob: 63a7f0ce5287dc606f4c0e82213b3c3210f41929 (plain) (blame)
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
{ alsa-lib
, cmake
, CoreAudio
, CoreFoundation
, CoreMIDI
, CoreServices
, fetchFromGitHub
, lib
, stdenv
}:

stdenv.mkDerivation {
  pname = "libremidi";
  version = "unstable-2023-05-05";

  src = fetchFromGitHub {
    owner = "jcelerier";
    repo = "libremidi";
    rev = "cd2e52d59c8ecc97d751619072c4f4271fa82455";
    hash = "sha256-CydoCprxqDl5FXjtgT+AckaRTqQAlCDwwrnPDK17A6o=";
  };

  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 = "A modern C++ MIDI real-time & file I/O library";
    homepage = "https://github.com/jcelerier/libremidi";
    maintainers = [ lib.maintainers.paveloom ];
    license = lib.licenses.bsd2;
    platforms = lib.platforms.all;
  };
}