about summary refs log tree commit diff
path: root/pkgs/applications/audio/midi-trigger/default.nix
blob: 9fcf49e5ae66720293b53c96be8226d4f8b0d3f2 (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
{ lib, stdenv, fetchFromGitHub, pkg-config, lv2 }:

stdenv.mkDerivation rec {
  pname = "midi-trigger";
  version = "0.0.4";

  src = fetchFromGitHub {
    owner = "unclechu";
    repo = "MIDI-Trigger";
    rev = "v${version}";
    sha256 = "sha256-tMnN8mTd6Bm46ZIDy0JPSVe77xCZws2XwQLQexDWPgU=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ lv2 ];

  makeFlags = [
    "CXX=cc"
    "BUILD_DIR=."
  ];

  installPhase = ''
    mkdir -p "$out/lib/lv2"
    mv midi-trigger.lv2 "$out/lib/lv2"
  '';

  meta = with lib; {
    homepage = "https://github.com/unclechu/MIDI-Trigger";
    description = "LV2 plugin which generates MIDI notes by detected audio signal peaks";
    maintainers = with maintainers; [ unclechu ];
    license = licenses.gpl3Only;
    platforms = platforms.unix;
  };
}