2021-01-17 00:15:33 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, lib
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, fetchpatch
|
|
|
|
|
, cmake
|
|
|
|
|
, pkg-config
|
|
|
|
|
, python3
|
|
|
|
|
, gettext
|
|
|
|
|
, file
|
|
|
|
|
, libvorbis
|
|
|
|
|
, libmad
|
|
|
|
|
, libjack2
|
|
|
|
|
, lv2
|
|
|
|
|
, lilv
|
|
|
|
|
, serd
|
|
|
|
|
, sord
|
2021-05-20 23:08:51 +00:00
|
|
|
|
, sqlite
|
2021-01-17 00:15:33 +00:00
|
|
|
|
, sratom
|
|
|
|
|
, suil
|
|
|
|
|
, libsndfile
|
|
|
|
|
, soxr
|
|
|
|
|
, flac
|
|
|
|
|
, twolame
|
|
|
|
|
, expat
|
|
|
|
|
, libid3tag
|
|
|
|
|
, libopus
|
|
|
|
|
, ffmpeg
|
|
|
|
|
, soundtouch
|
2021-12-19 01:06:50 +00:00
|
|
|
|
, pcre
|
|
|
|
|
/*, portaudio - given up fighting their portaudio.patch */
|
2021-05-04 21:07:42 +00:00
|
|
|
|
, linuxHeaders
|
2021-12-19 01:06:50 +00:00
|
|
|
|
, alsa-lib
|
2021-05-20 23:08:51 +00:00
|
|
|
|
, at-spi2-core
|
|
|
|
|
, dbus
|
2021-12-06 16:07:01 +00:00
|
|
|
|
, libepoxy
|
2021-05-20 23:08:51 +00:00
|
|
|
|
, libXdmcp
|
|
|
|
|
, libXtst
|
|
|
|
|
, libpthreadstubs
|
|
|
|
|
, libselinux
|
|
|
|
|
, libsepol
|
|
|
|
|
, libxkbcommon
|
|
|
|
|
, util-linux
|
2021-12-19 01:06:50 +00:00
|
|
|
|
, wxGTK
|
|
|
|
|
, AppKit ? null
|
|
|
|
|
, AudioToolbox ? null
|
|
|
|
|
, AudioUnit ? null
|
|
|
|
|
, Carbon ? null
|
|
|
|
|
, Cocoa ? null
|
|
|
|
|
, CoreAudio ? null
|
|
|
|
|
, CoreAudioKit ? null
|
|
|
|
|
, CoreServices ? null
|
|
|
|
|
, wxmac
|
2021-01-05 17:05:55 +00:00
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
|
# TODO
|
2021-05-20 23:08:51 +00:00
|
|
|
|
# 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
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-05-04 21:07:42 +00:00
|
|
|
|
let
|
2021-05-20 23:08:51 +00:00
|
|
|
|
inherit (lib) optionals;
|
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
|
wxWidgets_src = fetchFromGitHub {
|
|
|
|
|
owner = "audacity";
|
|
|
|
|
repo = "wxWidgets";
|
|
|
|
|
rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985";
|
|
|
|
|
sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a";
|
|
|
|
|
fetchSubmodules = true;
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec {
|
2021-12-19 01:06:50 +00:00
|
|
|
|
src = wxWidgets_src;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
wxmac' = wxmac.overrideAttrs (oldAttrs: rec {
|
|
|
|
|
src = wxWidgets_src;
|
2021-05-04 21:07:42 +00:00
|
|
|
|
});
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
2021-05-04 21:07:42 +00:00
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "audacity";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
# nixpkgs-update: no auto update
|
|
|
|
|
# Humans too! Let's wait to see how the situation with
|
|
|
|
|
# https://github.com/audacity/audacity/issues/1213 develops before
|
|
|
|
|
# pulling any updates that are subject to this privacy policy. We
|
|
|
|
|
# may wish to switch to a fork, but at the time of writing
|
|
|
|
|
# (2021-07-05) it's too early to tell how well any of the forks will
|
|
|
|
|
# be maintained.
|
2021-05-04 21:07:42 +00:00
|
|
|
|
version = "3.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "audacity";
|
|
|
|
|
repo = "audacity";
|
|
|
|
|
rev = "Audacity-${version}";
|
2021-05-04 21:07:42 +00:00
|
|
|
|
sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
|
patches = [
|
|
|
|
|
(fetchpatch {
|
2021-09-18 10:52:07 +00:00
|
|
|
|
url = "https://github.com/audacity/audacity/commit/7f8135e112a0e1e8e906abab9339680d1e491441.patch";
|
2021-05-04 21:07:42 +00:00
|
|
|
|
sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw";
|
2021-01-17 00:15:33 +00:00
|
|
|
|
name = "audacity_xdg_paths.patch";
|
|
|
|
|
})
|
2021-12-19 01:06:50 +00:00
|
|
|
|
# This is required to make audacity work with nixpkgs’ sqlite
|
|
|
|
|
# https://github.com/audacity/audacity/pull/1802 rebased onto 3.0.2
|
|
|
|
|
./0001-Use-a-different-approach-to-estimate-the-disk-space-.patch
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
touch src/RevisionIdent.h
|
2021-12-19 01:06:50 +00:00
|
|
|
|
'' + lib.optionalString stdenv.isLinux ''
|
2021-05-20 23:08:51 +00:00
|
|
|
|
substituteInPlace src/FileNames.cpp \
|
|
|
|
|
--replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
|
2021-05-04 21:07:42 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
|
|
|
|
gettext
|
|
|
|
|
pkg-config
|
|
|
|
|
python3
|
2021-05-20 23:08:51 +00:00
|
|
|
|
] ++ optionals stdenv.isLinux [
|
2021-05-04 21:07:42 +00:00
|
|
|
|
linuxHeaders
|
|
|
|
|
];
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
buildInputs = [
|
2021-01-17 00:15:33 +00:00
|
|
|
|
expat
|
|
|
|
|
ffmpeg
|
|
|
|
|
file
|
|
|
|
|
flac
|
|
|
|
|
libid3tag
|
|
|
|
|
libjack2
|
|
|
|
|
libmad
|
|
|
|
|
libopus
|
|
|
|
|
libsndfile
|
|
|
|
|
libvorbis
|
|
|
|
|
lilv
|
|
|
|
|
lv2
|
|
|
|
|
pcre
|
|
|
|
|
serd
|
|
|
|
|
sord
|
|
|
|
|
soundtouch
|
|
|
|
|
soxr
|
2021-05-20 23:08:51 +00:00
|
|
|
|
sqlite
|
2021-01-17 00:15:33 +00:00
|
|
|
|
sratom
|
|
|
|
|
suil
|
|
|
|
|
twolame
|
2021-05-20 23:08:51 +00:00
|
|
|
|
] ++ optionals stdenv.isLinux [
|
2021-12-19 01:06:50 +00:00
|
|
|
|
alsa-lib # for portaudio
|
2021-01-17 00:15:33 +00:00
|
|
|
|
at-spi2-core
|
|
|
|
|
dbus
|
2021-12-06 16:07:01 +00:00
|
|
|
|
libepoxy
|
2021-01-17 00:15:33 +00:00
|
|
|
|
libXdmcp
|
|
|
|
|
libXtst
|
|
|
|
|
libpthreadstubs
|
|
|
|
|
libxkbcommon
|
|
|
|
|
libselinux
|
|
|
|
|
libsepol
|
2021-05-20 23:08:51 +00:00
|
|
|
|
util-linux
|
2021-12-19 01:06:50 +00:00
|
|
|
|
wxGTK'
|
|
|
|
|
wxGTK'.gtk
|
|
|
|
|
] ++ optionals stdenv.isDarwin [
|
|
|
|
|
wxmac'
|
|
|
|
|
AppKit
|
|
|
|
|
Cocoa
|
|
|
|
|
CoreAudioKit
|
|
|
|
|
AudioUnit AudioToolbox CoreAudio CoreServices Carbon # for portaudio
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
|
"-Daudacity_use_ffmpeg=linked"
|
|
|
|
|
"-DDISABLE_DYNAMIC_LOADING_FFMPEG=ON"
|
2021-01-17 00:15:33 +00:00
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
doCheck = false; # Test fails
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "Sound editor with graphical UI";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
homepage = "https://www.audacityteam.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
license = licenses.gpl2Plus;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
maintainers = with maintainers; [ lheckemann veprbl ];
|
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|