nixpkgs-suyu/pkgs/applications/audio/sndpeek/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

56 lines
1.6 KiB
Nix

{ lib, 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 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 ];
};
}