git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #121623 from wlib/audacity-3.0.2

audacity: 2.4.2 -> 3.0.2

commit39e6bf76474ce742eb027a88c4da6331f0a1526f authorMaximilian Bosch <maximilian@mbosch.me> dateTue 4 May 2021, 23:07 (6 years ago) parent1b1d7e949cfef8
2 files changed+32−11
pkgs/applications/audio/audacity/default.nix+31−8 pkgs/top-level/all-packages.nix+1−3
pkgs/applications/audio/audacity/default.nix+31−8
@@ -28,6 +28,7 @@
2828, ffmpeg
2929, soundtouch
3030, pcre /*, portaudio - given up fighting their portaudio.patch */
31+, linuxHeaders
3132, at-spi2-core ? null
3233, dbus ? null
3334, epoxy ? null
@@ -41,24 +42,35 @@
4142}:
4243
4344# TODO
44−# - 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
45+# - 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
4546# - detach sbsms
4647
48+let
49+ wxGTK-audacity = wxGTK.overrideAttrs (oldAttrs: rec {
50+ src = fetchFromGitHub {
51+ owner = "audacity";
52+ repo = "wxWidgets";
53+ rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985";
54+ sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a";
55+ fetchSubmodules = true;
56+ };
57+ });
58+in
4759stdenv.mkDerivation rec {
4860 pname = "audacity";
49− version = "2.4.2";
61+ version = "3.0.2";
5062
5163 src = fetchFromGitHub {
5264 owner = "audacity";
5365 repo = "audacity";
5466 rev = "Audacity-${version}";
55− sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI=";
67+ sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj";
5668 };
5769
5870 patches = [
5971 (fetchpatch {
60− url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch";
61− sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc=";
72+ url = "https://github.com/audacity/audacity/commit/007852e51fcbb5f1f359d112f28b8984a604dac6.patch";
73+ sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw";
6274 name = "audacity_xdg_paths.patch";
6375 })
6476 ];
@@ -68,6 +80,10 @@ stdenv.mkDerivation rec {
6880 touch src/RevisionIdent.h
6981 '';
7082
83+ preConfigure = ''
84+ substituteInPlace src/FileNames.cpp --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
85+ '';
86+
7187 # workaround for a broken cmake. Drop it with a later version to see if it works.
7288 # https://github.com/NixOS/nixpkgs/issues/94905
7389 cmakeFlags = lib.optional stdenv.isLinux "-DCMAKE_OSX_ARCHITECTURES=";
@@ -86,7 +102,14 @@ stdenv.mkDerivation rec {
86102 "-lswscale"
87103 ];
88104
89− nativeBuildInputs = [ cmake gettext pkg-config python3 ];
105+ nativeBuildInputs = [
106+ cmake
107+ gettext
108+ pkg-config
109+ python3
110+ ] ++ lib.optionals stdenv.isLinux [
111+ linuxHeaders
112+ ];
90113
91114 buildInputs = [
92115 alsaLib
@@ -110,8 +133,8 @@ stdenv.mkDerivation rec {
110133 sratom
111134 suil
112135 twolame
113− wxGTK
114− wxGTK.gtk
136+ wxGTK-audacity
137+ wxGTK-audacity.gtk
115138 ] ++ lib.optionals stdenv.isLinux [
116139 at-spi2-core
117140 dbus
pkgs/top-level/all-packages.nix+1−3
@@ -22160,9 +22160,7 @@ in
2216022160 audacious = libsForQt5.callPackage ../applications/audio/audacious { };
2216122161 audaciousQt5 = audacious;
2216222162
22163− audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; };
22164− audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk3; };
22165− audacity = audacity-gtk2;
22163+ audacity = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; };
2216622164
2216722165 audio-recorder = callPackage ../applications/audio/audio-recorder { };
2216822166