From fb9de42ad19e8c5f90a9979e83271e635f586f86 Mon Sep 17 00:00:00 2001 From: Cillian de Roiste Date: Wed, 4 May 2011 23:54:03 +0000 Subject: [PATCH] Updating Sonic Visualiser, it isn't getting wrapped correctly, but otherwise it compiles and works svn path=/nixpkgs/trunk/; revision=27154 --- .../audio/sonic-visualiser/default.nix | 55 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/audio/sonic-visualiser/default.nix diff --git a/pkgs/applications/audio/sonic-visualiser/default.nix b/pkgs/applications/audio/sonic-visualiser/default.nix new file mode 100644 index 000000000000..9e818fd0f27d --- /dev/null +++ b/pkgs/applications/audio/sonic-visualiser/default.nix @@ -0,0 +1,55 @@ +# TODO add plugins having various licenses, see http://www.vamp-plugins.org/download.html + +{ stdenv, fetchurl, alsaLib, bzip2, fftw, jackaudio, libX11, liblo, +libmad, libogg, librdf, librdf_raptor, librdf_rasqal, libsamplerate, +libsndfile, makeWrapper, pulseaudio, qt, redland, rubberband, vampSDK +}: + +stdenv.mkDerivation { + name = "sonic-visualiser-1.8"; + + src = fetchurl { + url = http://downloads.sourceforge.net/sv1/sonic-visualiser-1.8.tar.gz; + sha256 = "16ik6q9n92wljvnqcv7hyzb9v3yp3ixxp6df9kasf53fii973dh7"; + }; + + buildInputs = + [ libsndfile qt fftw /* should be fftw3f ??*/ bzip2 librdf rubberband + libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland + # optional + jackaudio + # portaudio + pulseaudio + libmad + libogg # ? + # fishsound + liblo + ]; + + # TODO: Check if this is necessary + buildPhase = '' + for i in sonic-visualiser svapp svcore svgui; + do cd $i && qmake -makefile PREFIX=$out && cd ..; + done + make + ''; + + installPhase = '' + ensureDir $out/{bin,share/sonic-visualiser} + cp sonic-visualiser/sonic-visualiser $out/bin + cp -r sonic-visualiser/samples $out/share/sonic-visualiser/samples + ''; + + # TODO: Fix this, it is not getting called + postInstall = '' + wrapProgram $out/bin/sonic-visualiser --prefix LD_LIBRARY_PATH : ${libX11}/lib + ''; + + meta = { + description = "View and analyse contents of music audio files"; + homepage = http://www.sonicvisualiser.org/; + license = "GPLv2"; + maintainers = [ stdenv.lib.maintainers.marcweber ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a996d2b148b..52aed19148c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6820,9 +6820,11 @@ let guile = guile_1_8; }; - sonicVisualizer = callPackage ../applications/audio/sonic-visualizer { + sonicVisualiser = callPackage ../applications/audio/sonic-visualiser { inherit (vamp) vampSDK; + inherit (xlibs) libX11; qt = qt4; + fftw = fftwSinglePrec; }; sox = callPackage ../applications/misc/audio/sox { };