diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index cc96f6dbbb31..f91fc03ec019 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -1,8 +1,10 @@ -{ stdenv, fetchurl, wxGTK30, pkgconfig, gettext, gtk2, glib, zlib, perl, intltool, +{ stdenv, fetchurl, wxGTK30, pkgconfig, file, gettext, gtk2, glib, zlib, perl, intltool, libogg, libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, fetchpatch, expat, libid3tag, ffmpeg, soundtouch /*, portaudio - given up fighting their portaudio.patch */ }: +with stdenv.lib; + stdenv.mkDerivation rec { version = "2.1.2"; name = "audacity-${version}"; @@ -23,12 +25,34 @@ stdenv.mkDerivation rec { mkdir lib-src mv lib-src-rm/{Makefile*,lib-widget-extra,portaudio-v19,portmixer,portsmf,FileDialog,sbsms,libnyquist} lib-src/ rm -r lib-src-rm/ + + # we will get a (possibly harmless) warning during configure without this + substituteInPlace configure \ + --replace /usr/bin/file ${file}/bin/file ''; - configureFlags = [ "--with-libsamplerate" ]; + configureFlags = [ + "--with-libsamplerate" + ]; + + # audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually + NIX_LDFLAGS = [ + # LAME + "-lmp3lame" + # ffmpeg + "-lavcodec" + "-lavdevice" + "-lavfilter" + "-lavformat" + "-lavresample" + "-lavutil" + "-lpostproc" + "-lswresample" + "-lswscale" + ]; buildInputs = [ - pkgconfig gettext wxGTK30 expat alsaLib + pkgconfig file gettext wxGTK30 expat alsaLib libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil gtk2 ffmpeg libmad lame libvorbis flac soundtouch ]; #ToDo: detach sbsms @@ -36,11 +60,11 @@ stdenv.mkDerivation rec { dontDisableStatic = true; doCheck = false; # Test fails - meta = { + meta = with stdenv.lib; { description = "Sound editor with graphical UI"; homepage = http://audacityteam.org/; - license = stdenv.lib.licenses.gpl2Plus; - platforms = with stdenv.lib.platforms; linux; - maintainers = with stdenv.lib.maintainers; [ the-kenny ]; + license = licenses.gpl2Plus; + platforms = with platforms; linux; + maintainers = with maintainers; [ the-kenny ]; }; }