about summary refs log tree commit diff
path: root/pkgs/applications/audio/puredata/default.nix
blob: 5d1b11c4ef29e69f379a66c1fb025c3e53584389 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ lib
, stdenv
, fetchurl
, autoreconfHook
, gettext
, makeWrapper
, alsa-lib
, libjack2
, tk
, fftw
, portaudio
}:

stdenv.mkDerivation rec {
  pname = "puredata";
  version = "0.54-1";

  src = fetchurl {
    url = "http://msp.ucsd.edu/Software/pd-${version}.src.tar.gz";
    hash = "sha256-hcPUvTYgtAHntdWEeHoFIIKylMTE7us1g9dwnZP9BMI=";
  };

  nativeBuildInputs = [ autoreconfHook gettext makeWrapper ];

  buildInputs = [
    fftw
    libjack2
  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
    alsa-lib
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    portaudio
  ];

  configureFlags = [
    "--enable-universal"
    "--enable-fftw"
    "--enable-jack"
  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
    "--enable-alsa"
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    "--enable-portaudio"
    "--without-local-portaudio"
    "--disable-jack-framework"
    "--with-wish=${tk}/bin/wish8.6"
  ];

  postInstall = ''
    wrapProgram $out/bin/pd --prefix PATH : ${lib.makeBinPath [ tk ]}
  '';

  meta = with lib; {
    description = ''A real-time graphical programming environment for
                    audio, video, and graphical processing'';
    homepage = "http://puredata.info";
    license = licenses.bsd3;
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [ carlthome ];
    mainProgram = "pd";
    changelog = "https://msp.puredata.info/Pd_documentation/x5.htm#s1";
  };
}