summary refs log tree commit diff
path: root/pkgs/applications/audio/pd-plugins/timbreid/default.nix
blob: 7fd2adefce075bf291e8081586e83958d42a55eb (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
{ lib, stdenv, fetchurl, unzip, puredata, fftw }:

stdenv.mkDerivation rec {
  version = "0.7.0";
  pname = "timbreid";

  src = fetchurl {
    url = "http://williambrent.conflations.com/pd/timbreID-${version}-src.zip";
    sha256 = "14k2xk5zrzrw1zprdbwx45hrlc7ck8vq4drpd3l455i5r8yk4y6b";
  };

  nativeBuildInputs = [ unzip ];
  buildInputs = [ puredata fftw ];

  unpackPhase = ''
    mkdir source
    cd source
    unzip $src
  '';

  buildPhase = ''
    make tIDLib.o all
 '';

  installPhase = ''
    mkdir -p $out/
    cp -r *.pd $out/
    cp -r *.pd_linux $out/
    cp -r audio/ $out/
    cp -r data/ $out/
    cp -r doc/ $out/
  '';

  postFixup = ''
    mv $out/share/doc/ $out/
    rm -rf $out/share/
    '';

  meta = {
    description = "A collection of audio feature analysis externals for puredata";
    homepage = "http://williambrent.conflations.com/pages/research.html";
    license = lib.licenses.gpl3;
    maintainers = [ lib.maintainers.magnetophon ];
    platforms = lib.platforms.linux;
  };
}