summary refs log tree commit diff
path: root/pkgs/misc/jackaudio/default.nix
blob: 77d3c2f35ab9d855d7c9e5d8beaaf2d69fe0bb2a (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
45
{ stdenv, fetchurl, alsaLib, dbus, expat, libsamplerate
, libsndfile, makeWrapper, pkgconfig, python, pythonDBus
, firewireSupport ? false, ffado ? null }:

assert firewireSupport -> ffado != null;

stdenv.mkDerivation rec {
  name = "jackdbus-${version}";
  version = "1.9.8";

  src = fetchurl {
    urls = [
      "http://pkgs.fedoraproject.org/lookaside/pkgs/jack-audio-connection-kit/jack-1.9.8.tgz/1dd2ff054cab79dfc11d134756f27165/jack-1.9.8.tgz"
      "http://www.grame.fr/~letz/jack-1.9.8.tgz"
    ];
    sha256 = "0788092zxrivcfnfg15brpjkf14x8ma8cwjz4k0b9xdxajn2wwac";
  };

  buildInputs =
    [ alsaLib dbus expat libsamplerate libsndfile makeWrapper
      pkgconfig python pythonDBus
    ] ++ (stdenv.lib.optional firewireSupport ffado);

  patches = ./ffado_setbuffsize-jack2.patch;

  configurePhase = ''
    cd jack-1.9.8
    python waf configure --prefix=$out --dbus --alsa ${if firewireSupport then "--firewire" else ""}
  '';

  buildPhase = "python waf build";

  installPhase = ''
    python waf install
    wrapProgram $out/bin/jack_control --set PYTHONPATH $PYTHONPATH
  '';

  meta = with stdenv.lib; {
    description = "JACK audio connection kit, version 2 with jackdbus";
    homepage = "http://jackaudio.org";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = [ maintainers.goibhniu ];
  };
}