From 858f8f27fa6433a0097fa7d365c55b84fda99439 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 30 Dec 2016 12:40:28 +0800 Subject: audacity: fix library path using NIX_LDFLAGS --- pkgs/applications/audio/audacity/default.nix | 38 +++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'pkgs/applications/audio') diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index cc96f6dbbb3..f91fc03ec01 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 ]; }; } -- cgit 1.4.1