audacity: 2.4.1 -> 2.4.2

A few other things:
 - prep for transition to gtk3 when audacity recommends it
 - we drop the runtime linking with lame as audacity is picking it up on
   its own
 - on linux, add a number of missing dependencies.
 - use a newer (recommended) wxwidgets
 - add a patch (merged upstream) that makes audacity follow XDG for file locations
This commit is contained in:
Peter Hoeg 2020-09-07 23:48:50 +08:00
parent d3afdf90db
commit 249db9f8a7
2 changed files with 106 additions and 22 deletions

View File

@ -1,28 +1,79 @@
{ lib, stdenv, fetchzip, wxGTK30, pkgconfig, file, gettext, { stdenv
libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, , lib
expat, libid3tag, ffmpeg_3, soundtouch, /*, portaudio - given up fighting their portaudio.patch */ , fetchFromGitHub
cmake , fetchpatch
, cmake
, wxGTK
, pkg-config
, python3
, gettext
, file
, libvorbis
, libmad
, libjack2
, lv2
, lilv
, serd
, sord
, sratom
, suil
, alsaLib
, libsndfile
, soxr
, flac
, twolame
, expat
, libid3tag
, libopus
, ffmpeg
, soundtouch
, pcre /*, portaudio - given up fighting their portaudio.patch */
, at-spi2-core ? null
, dbus ? null
, epoxy ? null
, libXdmcp ? null
, libXtst ? null
, libpthreadstubs ? null
, libselinux ? null
, libsepol ? null
, libxkbcommon ? null
, utillinux ? null
}: }:
with stdenv.lib; # TODO
# - as of 2.4.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions
# - detach sbsms
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.4.1";
pname = "audacity"; pname = "audacity";
version = "2.4.2";
src = fetchzip { src = fetchFromGitHub {
url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz"; owner = "audacity";
sha256 = "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn"; repo = "audacity";
rev = "Audacity-${version}";
sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI=";
}; };
cmakeFlags = [ patches = [
"-DCMAKE_BUILD_TYPE=Release" (fetchpatch {
url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch";
sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc=";
name = "audacity_xdg_paths.patch";
})
]; ];
# audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually # this file *should* be generated by cmake but as of 2.4.2 isn't yet
postPatch = ''
touch src/RevisionIdent.h
'';
# workaround for a broken cmake. Drop it with a later version to see if it works.
# https://github.com/NixOS/nixpkgs/issues/94905
cmakeFlags = lib.optional stdenv.isLinux "-DCMAKE_OSX_ARCHITECTURES=";
# audacity only looks for ffmpeg at runtime, so we need to link it in manually
NIX_LDFLAGS = toString [ NIX_LDFLAGS = toString [
# LAME
"-lmp3lame"
# ffmpeg # ffmpeg
"-lavcodec" "-lavcodec"
"-lavdevice" "-lavdevice"
@ -35,14 +86,45 @@ stdenv.mkDerivation rec {
"-lswscale" "-lswscale"
]; ];
nativeBuildInputs = [ pkgconfig cmake ]; nativeBuildInputs = [ cmake gettext pkg-config python3 ];
buildInputs = [
file gettext wxGTK30 expat alsaLib buildInputs = [
libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil wxGTK30.gtk alsaLib
ffmpeg_3 libmad lame libvorbis flac soundtouch expat
]; #ToDo: detach sbsms ffmpeg
file
flac
libid3tag
libjack2
libmad
libopus
libsndfile
libvorbis
lilv
lv2
pcre
serd
sord
soundtouch
soxr
sratom
suil
twolame
wxGTK
wxGTK.gtk
] ++ lib.optionals stdenv.isLinux [
at-spi2-core
dbus
epoxy
libXdmcp
libXtst
libpthreadstubs
libxkbcommon
libselinux
libsepol
utillinux
];
dontDisableStatic = true;
doCheck = false; # Test fails doCheck = false; # Test fails
meta = with lib; { meta = with lib; {

View File

@ -21054,7 +21054,9 @@ in
audacious = libsForQt5.callPackage ../applications/audio/audacious { }; audacious = libsForQt5.callPackage ../applications/audio/audacious { };
audaciousQt5 = audacious; audaciousQt5 = audacious;
audacity = callPackage ../applications/audio/audacity { }; audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; };
audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk3; };
audacity = audacity-gtk2;
audio-recorder = callPackage ../applications/audio/audio-recorder { }; audio-recorder = callPackage ../applications/audio/audio-recorder { };