git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit249db9f8a74ed32f93b25ba5dd17503e4ca96fb2 authorPeter Hoeg <peter@hoeg.com> dateMon 7 Sep 2020, 23:48 (6 years ago) parentd3afdf9
2 files changed+105−21
pkgs/applications/audio/audacity/default.nix+102−20 pkgs/top-level/all-packages.nix+3−1
pkgs/applications/audio/audacity/default.nix+102−20
@@ -1,28 +1,79 @@
1−{ lib, stdenv, fetchzip, wxGTK30, pkgconfig, file, gettext,
2− libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame,
3− expat, libid3tag, ffmpeg_3, soundtouch, /*, portaudio - given up fighting their portaudio.patch */
4− cmake
1+{ stdenv
2+, lib
3+, fetchFromGitHub
4+, fetchpatch
5+, cmake
6+, wxGTK
7+, pkg-config
8+, python3
9+, gettext
10+, file
11+, libvorbis
12+, libmad
13+, libjack2
14+, lv2
15+, lilv
16+, serd
17+, sord
18+, sratom
19+, suil
20+, alsaLib
21+, libsndfile
22+, soxr
23+, flac
24+, twolame
25+, expat
26+, libid3tag
27+, libopus
28+, ffmpeg
29+, soundtouch
30+, pcre /*, portaudio - given up fighting their portaudio.patch */
31+, at-spi2-core ? null
32+, dbus ? null
33+, epoxy ? null
34+, libXdmcp ? null
35+, libXtst ? null
36+, libpthreadstubs ? null
37+, libselinux ? null
38+, libsepol ? null
39+, libxkbcommon ? null
40+, utillinux ? null
541}:
642
7−with stdenv.lib;
43+# 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+# - detach sbsms
846
947stdenv.mkDerivation rec {
10− version = "2.4.1";
1148 pname = "audacity";
49+ version = "2.4.2";
1250
13− src = fetchzip {
14− url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
15− sha256 = "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn";
51+ src = fetchFromGitHub {
52+ owner = "audacity";
53+ repo = "audacity";
54+ rev = "Audacity-${version}";
55+ sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI=";
1656 };
1757
18− cmakeFlags = [
19− "-DCMAKE_BUILD_TYPE=Release"
58+ patches = [
59+ (fetchpatch {
60+ url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch";
61+ sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc=";
62+ name = "audacity_xdg_paths.patch";
63+ })
2064 ];
2165
22− # audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually
66+ # this file *should* be generated by cmake but as of 2.4.2 isn't yet
67+ postPatch = ''
68+ touch src/RevisionIdent.h
69+ '';
70+
71+ # workaround for a broken cmake. Drop it with a later version to see if it works.
72+ # https://github.com/NixOS/nixpkgs/issues/94905
73+ cmakeFlags = lib.optional stdenv.isLinux "-DCMAKE_OSX_ARCHITECTURES=";
74+
75+ # audacity only looks for ffmpeg at runtime, so we need to link it in manually
2376 NIX_LDFLAGS = toString [
24− # LAME
25− "-lmp3lame"
2677 # ffmpeg
2778 "-lavcodec"
2879 "-lavdevice"
@@ -35,14 +86,45 @@ stdenv.mkDerivation rec {
3586 "-lswscale"
3687 ];
3788
38− nativeBuildInputs = [ pkgconfig cmake ];
89+ nativeBuildInputs = [ cmake gettext pkg-config python3 ];
90+
3991 buildInputs = [
40− file gettext wxGTK30 expat alsaLib
41− libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil wxGTK30.gtk
42− ffmpeg_3 libmad lame libvorbis flac soundtouch
43− ]; #ToDo: detach sbsms
92+ alsaLib
93+ expat
94+ ffmpeg
95+ file
96+ flac
97+ libid3tag
98+ libjack2
99+ libmad
100+ libopus
101+ libsndfile
102+ libvorbis
103+ lilv
104+ lv2
105+ pcre
106+ serd
107+ sord
108+ soundtouch
109+ soxr
110+ sratom
111+ suil
112+ twolame
113+ wxGTK
114+ wxGTK.gtk
115+ ] ++ lib.optionals stdenv.isLinux [
116+ at-spi2-core
117+ dbus
118+ epoxy
119+ libXdmcp
120+ libXtst
121+ libpthreadstubs
122+ libxkbcommon
123+ libselinux
124+ libsepol
125+ utillinux
126+ ];
44127
45− dontDisableStatic = true;
46128 doCheck = false; # Test fails
47129
48130 meta = with lib; {
pkgs/top-level/all-packages.nix+3−1
@@ -21054,7 +21054,9 @@ in
2105421054 audacious = libsForQt5.callPackage ../applications/audio/audacious { };
2105521055 audaciousQt5 = audacious;
2105621056
21057− audacity = callPackage ../applications/audio/audacity { };
21057+ audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; };
21058+ audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk3; };
21059+ audacity = audacity-gtk2;
2105821060
2105921061 audio-recorder = callPackage ../applications/audio/audio-recorder { };
2106021062