diff options
-rw-r--r-- | pkgs/applications/audio/audacity/default.nix | 122 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 105 insertions, 21 deletions
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 1f5468f7db3..c3daee55fc4 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -1,28 +1,79 @@ -{ lib, stdenv, fetchzip, wxGTK30, pkgconfig, file, gettext, - libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, - expat, libid3tag, ffmpeg_3, soundtouch, /*, portaudio - given up fighting their portaudio.patch */ - cmake +{ stdenv +, lib +, fetchFromGitHub +, 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 { - version = "2.4.1"; pname = "audacity"; + version = "2.4.2"; - src = fetchzip { - url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz"; - sha256 = "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn"; + src = fetchFromGitHub { + owner = "audacity"; + repo = "audacity"; + rev = "Audacity-${version}"; + sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI="; }; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" + patches = [ + (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 [ - # LAME - "-lmp3lame" # ffmpeg "-lavcodec" "-lavdevice" @@ -35,14 +86,45 @@ stdenv.mkDerivation rec { "-lswscale" ]; - nativeBuildInputs = [ pkgconfig cmake ]; + nativeBuildInputs = [ cmake gettext pkg-config python3 ]; + buildInputs = [ - file gettext wxGTK30 expat alsaLib - libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil wxGTK30.gtk - ffmpeg_3 libmad lame libvorbis flac soundtouch - ]; #ToDo: detach sbsms + alsaLib + expat + 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 meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5deb6b918f9..816c5f3e9c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21054,7 +21054,9 @@ in audacious = libsForQt5.callPackage ../applications/audio/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 { }; |