about summary refs log tree commit diff
path: root/pkgs/applications/audio/a2jmidid/default.nix
blob: 517db11c2865f8b99ce62c17a1e2d5d6cc4dc745 (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
{ lib, stdenv, fetchFromGitea, makeWrapper, pkg-config, alsa-lib, dbus, libjack2
, python3Packages , meson, ninja, gitUpdater }:

stdenv.mkDerivation rec {
  pname = "a2jmidid";
  version = "12";

  src = fetchFromGitea {
    domain = "gitea.ladish.org";
    owner = "LADI";
    repo = "a2jmidid";
    rev = "refs/tags/${version}";
    fetchSubmodules = true;
    hash = "sha256-PZKGhHmPMf0AucPruOLB9DniM5A3BKdghFCrd5pTzeM=";
  };

  nativeBuildInputs = [ pkg-config makeWrapper meson ninja ];
  buildInputs = [ alsa-lib dbus libjack2 ] ++
                (with python3Packages; [ python dbus-python ]);

  postInstall = ''
    wrapProgram $out/bin/a2j_control --set PYTHONPATH $PYTHONPATH
    substituteInPlace $out/bin/a2j --replace "a2j_control" "$out/bin/a2j_control"
  '';

  passthru.updateScript = gitUpdater { };

  meta = with lib; {
    description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
    homepage = "https://a2jmidid.ladish.org/";
    license = licenses.gpl2Only;
    maintainers = [ maintainers.goibhniu ];
    platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
  };
}