summary refs log tree commit diff
path: root/pkgs/applications/audio/paulstretch/default.nix
blob: f6cee7672f7ca5f2ac7e370120b5d4b5ef306ccd (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
{ stdenv, fetchFromGitHub, fetchpatch
, audiofile, libvorbis, fltk, fftw, fftwFloat
, minixml, pkgconfig, libmad, libjack2, portaudio, libsamplerate
}:

stdenv.mkDerivation {
  pname = "paulstretch";
  version = "2.2-2";

  src = fetchFromGitHub {
    owner = "paulnasca";
    repo = "paulstretch_cpp";
    rev = "7f5c3993abe420661ea0b808304b0e2b4b0048c5";
    sha256 = "06dy03dbz1yznhsn0xvsnkpc5drzwrgxbxdx0hfpsjn2xcg0jrnc";
  };

  nativeBuildInputs = [ pkgconfig ];

  buildInputs = [
    audiofile
    libvorbis
    fltk
    fftw
    fftwFloat
    minixml
    libmad
    libjack2
    portaudio
    libsamplerate
  ];

  patches = [
    (fetchpatch {
      url = "https://github.com/paulnasca/paulstretch_cpp/pull/12.patch";
      sha256 = "0lx1rfrs53afkiz1drp456asqgj5yv6hx3lkc01165cv1jsbw6q4";
    })
  ];

  buildPhase = ''
    bash compile_linux_fftw_jack.sh
  '';

  installPhase = ''
    install -Dm555 ./paulstretch $out/bin/paulstretch
  '';

  meta = with stdenv.lib; {
    description = "Produces high quality extreme sound stretching";
    longDescription = ''
      This is a program for stretching the audio. It is suitable only for
      extreme sound stretching of the audio (like 50x) and for applying
      special effects by "spectral smoothing" the sounds.
      It can transform any sound/music to a texture.
    '';
    homepage = "http://hypermammut.sourceforge.net/paulstretch/";
    platforms = platforms.linux;
    license = licenses.gpl2;
  };
}