diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/audacity/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/audacity/default.nix | 79 |
1 files changed, 50 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/applications/audio/audacity/default.nix b/nixpkgs/pkgs/applications/audio/audacity/default.nix index 36320a01061f..354bc0ebd764 100644 --- a/nixpkgs/pkgs/applications/audio/audacity/default.nix +++ b/nixpkgs/pkgs/applications/audio/audacity/default.nix @@ -15,9 +15,10 @@ , lilv , serd , sord +, sqlite , sratom , suil -, alsaLib +, alsa-lib , libsndfile , soxr , flac @@ -28,53 +29,65 @@ , 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 +, linuxHeaders +, at-spi2-core +, dbus +, epoxy +, libXdmcp +, libXtst +, libpthreadstubs +, libselinux +, libsepol +, libxkbcommon +, util-linux }: # 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 +# 1. as of 3.0.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions +# 2. detach sbsms +let + inherit (lib) optionals; + + wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec { + src = fetchFromGitHub { + owner = "audacity"; + repo = "wxWidgets"; + rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985"; + sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a"; + fetchSubmodules = true; + }; + }); + +in stdenv.mkDerivation rec { pname = "audacity"; - version = "2.4.2"; + version = "3.0.2"; src = fetchFromGitHub { owner = "audacity"; repo = "audacity"; rev = "Audacity-${version}"; - sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI="; + sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj"; }; patches = [ (fetchpatch { - url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch"; - sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc="; + url = "https://github.com/audacity/audacity/pull/831/commits/007852e51fcbb5f1f359d112f28b8984a604dac6.patch"; + sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw"; name = "audacity_xdg_paths.patch"; }) ]; - # 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="; + substituteInPlace src/FileNames.cpp \ + --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h + ''; # audacity only looks for ffmpeg at runtime, so we need to link it in manually NIX_LDFLAGS = toString [ - # ffmpeg "-lavcodec" "-lavdevice" "-lavfilter" @@ -86,10 +99,17 @@ stdenv.mkDerivation rec { "-lswscale" ]; - nativeBuildInputs = [ cmake gettext pkg-config python3 ]; + nativeBuildInputs = [ + cmake + gettext + pkg-config + python3 + ] ++ optionals stdenv.isLinux [ + linuxHeaders + ]; buildInputs = [ - alsaLib + alsa-lib expat ffmpeg file @@ -107,12 +127,13 @@ stdenv.mkDerivation rec { sord soundtouch soxr + sqlite sratom suil twolame - wxGTK - wxGTK.gtk - ] ++ lib.optionals stdenv.isLinux [ + wxGTK' + wxGTK'.gtk + ] ++ optionals stdenv.isLinux [ at-spi2-core dbus epoxy @@ -122,7 +143,7 @@ stdenv.mkDerivation rec { libxkbcommon libselinux libsepol - utillinux + util-linux ]; doCheck = false; # Test fails |