@@ -30,24 +30,26 @@
3030, soundtouch
3131, pcre /*, portaudio - given up fighting their portaudio.patch */
3232, linuxHeaders
33−, at-spi2-core ? null
34−, dbus ? null
35−, epoxy ? null
36−, libXdmcp ? null
37−, libXtst ? null
38−, libpthreadstubs ? null
39−, libselinux ? null
40−, libsepol ? null
41−, libxkbcommon ? null
42−, utillinux ? null
33+, at-spi2-core
34+, dbus
35+, epoxy
36+, libXdmcp
37+, libXtst
38+, libpthreadstubs
39+, libselinux
40+, libsepol
41+, libxkbcommon
42+, util-linux
4343}:
4444
4545# TODO
46−# - 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
47−# - detach sbsms
46+# 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
47+# 2. detach sbsms
4848
4949let
50− wxGTK-audacity = wxGTK.overrideAttrs (oldAttrs: rec {
50+ inherit (lib) optionals;
51+
52+ wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec {
5153 src = fetchFromGitHub {
5254 owner = "audacity";
5355 repo = "wxWidgets";
@@ -56,6 +58,7 @@ let
5658 fetchSubmodules = true;
5759 };
5860 });
61+
5962in
6063stdenv.mkDerivation rec {
6164 pname = "audacity";
@@ -70,28 +73,21 @@ stdenv.mkDerivation rec {
7073
7174 patches = [
7275 (fetchpatch {
73− url = "https://github.com/audacity/audacity/commit/007852e51fcbb5f1f359d112f28b8984a604dac6.patch";
76+ url = "https://github.com/audacity/audacity/pull/831/commits/007852e51fcbb5f1f359d112f28b8984a604dac6.patch";
7477 sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw";
7578 name = "audacity_xdg_paths.patch";
7679 })
7780 ];
7881
79− # this file *should* be generated by cmake but as of 2.4.2 isn't yet
8082 postPatch = ''
8183 touch src/RevisionIdent.h
82− '';
8384
84− preConfigure = ''
85− substituteInPlace src/FileNames.cpp --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
85+ substituteInPlace src/FileNames.cpp \
86+ --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
8687 '';
8788
88− # workaround for a broken cmake. Drop it with a later version to see if it works.
89− # https://github.com/NixOS/nixpkgs/issues/94905
90− cmakeFlags = lib.optional stdenv.isLinux "-DCMAKE_OSX_ARCHITECTURES=";
91−
9289 # audacity only looks for ffmpeg at runtime, so we need to link it in manually
9390 NIX_LDFLAGS = toString [
94− # ffmpeg
9591 "-lavcodec"
9692 "-lavdevice"
9793 "-lavfilter"
@@ -108,7 +104,7 @@ stdenv.mkDerivation rec {
108104 gettext
109105 pkg-config
110106 python3
111− ] ++ lib.optionals stdenv.isLinux [
107+ ] ++ optionals stdenv.isLinux [
112108 linuxHeaders
113109 ];
114110
@@ -135,9 +131,9 @@ stdenv.mkDerivation rec {
135131 sratom
136132 suil
137133 twolame
138− wxGTK-audacity
139− wxGTK-audacity.gtk
140− ] ++ lib.optionals stdenv.isLinux [
134+ wxGTK'
135+ wxGTK'.gtk
136+ ] ++ optionals stdenv.isLinux [
141137 at-spi2-core
142138 dbus
143139 epoxy
@@ -147,7 +143,7 @@ stdenv.mkDerivation rec {
147143 libxkbcommon
148144 libselinux
149145 libsepol
150− utillinux
146+ util-linux
151147 ];
152148
153149 doCheck = false; # Test fails