summary refs log tree commit diff
path: root/pkgs/applications/audio/sndpeek/default.nix
blob: ecdafdaeadddc433156975a0b714302905b0be72 (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
{ stdenv, fetchurl, libsndfile, freeglut, alsaLib, mesa, libGLU, libX11, libXmu
, libXext, libXi }:

stdenv.mkDerivation rec {
  pname = "sndpeek";
  version = "1.4";

  src = fetchurl {
    url = "https://soundlab.cs.princeton.edu/software/sndpeek/files/sndpeek-${version}.tgz";
    sha256 = "2d86cf74854fa00dcdc05a35dd92bc4cf6115e87102b17023be5cba9ead8eedf";
  };
  sourceRoot = "sndpeek-${version}/src/sndpeek";

  # this patch adds -lpthread to the list of libraries, without it a
  # symbol-not-found-error is thrown
  patches = [ ./pthread.patch ];

  buildInputs = [
    freeglut
    alsaLib
    mesa
    libGLU
    libsndfile
    libX11
    libXmu
    libXext
    libXi
  ];
  buildFlags = "linux-alsa";

  installPhase = ''
    mkdir -p $out/bin
    mv sndpeek $out/bin
  '';

  meta = with stdenv.lib; {
    description = "Real-time 3D animated audio display/playback";
    longDescription = ''
       sndpeek is just what it sounds (and looks) like:
         * real-time 3D animated display/playback
         * can use mic-input or wav/aiff/snd/raw/mat file (with playback)
         * time-domain waveform
         * FFT magnitude spectrum
         * 3D waterfall plot
         * lissajous! (interchannel correlation)
         * rotatable and scalable display
         * freeze frame! (for didactic purposes)
         * real-time spectral feature extraction (centroid, rms, flux, rolloff)
         * available on MacOS X, Linux, and Windows under GPL
         * part of the sndtools distribution.
    '';
    homepage = https://soundlab.cs.princeton.edu/software/sndpeek/;
    license = licenses.gpl2;
    maintainers = [ maintainers.laikq ];
  };
}