2020-09-07 15:48:50 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2021-05-04 02:06:51 +00:00
|
|
|
, fetchpatch
|
2020-09-07 15:48:50 +00:00
|
|
|
, cmake
|
2021-05-04 03:00:47 +00:00
|
|
|
, wxGTK
|
2020-09-07 15:48:50 +00:00
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, gettext
|
|
|
|
, file
|
|
|
|
, libvorbis
|
|
|
|
, libmad
|
|
|
|
, libjack2
|
|
|
|
, lv2
|
|
|
|
, lilv
|
|
|
|
, serd
|
|
|
|
, sord
|
2021-05-07 11:38:50 +00:00
|
|
|
, sqlite
|
2020-09-07 15:48:50 +00:00
|
|
|
, sratom
|
|
|
|
, suil
|
|
|
|
, alsaLib
|
|
|
|
, libsndfile
|
|
|
|
, soxr
|
|
|
|
, flac
|
|
|
|
, twolame
|
|
|
|
, expat
|
|
|
|
, libid3tag
|
|
|
|
, libopus
|
|
|
|
, ffmpeg
|
|
|
|
, soundtouch
|
|
|
|
, pcre /*, portaudio - given up fighting their portaudio.patch */
|
2021-05-04 03:00:47 +00:00
|
|
|
, linuxHeaders
|
2021-05-05 11:04:07 +00:00
|
|
|
, at-spi2-core
|
|
|
|
, dbus
|
|
|
|
, epoxy
|
|
|
|
, libXdmcp
|
|
|
|
, libXtst
|
|
|
|
, libpthreadstubs
|
|
|
|
, libselinux
|
|
|
|
, libsepol
|
|
|
|
, libxkbcommon
|
|
|
|
, util-linux
|
2020-12-23 11:55:58 +00:00
|
|
|
}:
|
2007-10-29 10:52:04 +00:00
|
|
|
|
2020-09-07 15:48:50 +00:00
|
|
|
# TODO
|
2021-05-05 11:04:07 +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
|
2016-12-30 04:40:28 +00:00
|
|
|
|
2021-05-04 03:00:47 +00:00
|
|
|
let
|
2021-05-05 11:04:07 +00:00
|
|
|
inherit (lib) optionals;
|
|
|
|
|
|
|
|
wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec {
|
2021-05-04 03:00:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "audacity";
|
|
|
|
repo = "wxWidgets";
|
|
|
|
rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985";
|
|
|
|
sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
});
|
2021-05-05 11:04:07 +00:00
|
|
|
|
2021-05-04 03:00:47 +00:00
|
|
|
in
|
2011-01-02 17:13:34 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "audacity";
|
2021-05-03 18:40:20 +00:00
|
|
|
version = "3.0.2";
|
2009-03-30 07:33:31 +00:00
|
|
|
|
2020-09-07 15:48:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "audacity";
|
|
|
|
repo = "audacity";
|
|
|
|
rev = "Audacity-${version}";
|
2021-05-03 18:40:20 +00:00
|
|
|
sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj";
|
2009-03-30 07:33:31 +00:00
|
|
|
};
|
2013-06-04 09:35:33 +00:00
|
|
|
|
2021-05-04 02:06:51 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2021-05-05 11:04:07 +00:00
|
|
|
url = "https://github.com/audacity/audacity/pull/831/commits/007852e51fcbb5f1f359d112f28b8984a604dac6.patch";
|
2021-05-04 03:00:47 +00:00
|
|
|
sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw";
|
2021-05-04 02:06:51 +00:00
|
|
|
name = "audacity_xdg_paths.patch";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
touch src/RevisionIdent.h
|
|
|
|
|
2021-05-05 11:04:07 +00:00
|
|
|
substituteInPlace src/FileNames.cpp \
|
|
|
|
--replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
|
2021-05-04 03:00:47 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-07 15:48:50 +00:00
|
|
|
# audacity only looks for ffmpeg at runtime, so we need to link it in manually
|
2019-10-30 00:40:49 +00:00
|
|
|
NIX_LDFLAGS = toString [
|
2016-12-30 04:40:28 +00:00
|
|
|
"-lavcodec"
|
|
|
|
"-lavdevice"
|
|
|
|
"-lavfilter"
|
|
|
|
"-lavformat"
|
|
|
|
"-lavresample"
|
|
|
|
"-lavutil"
|
|
|
|
"-lpostproc"
|
|
|
|
"-lswresample"
|
|
|
|
"-lswscale"
|
|
|
|
];
|
2015-09-29 21:02:46 +00:00
|
|
|
|
2021-05-04 03:00:47 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
gettext
|
|
|
|
pkg-config
|
|
|
|
python3
|
2021-05-05 11:04:07 +00:00
|
|
|
] ++ optionals stdenv.isLinux [
|
2021-05-04 03:00:47 +00:00
|
|
|
linuxHeaders
|
|
|
|
];
|
2020-09-07 15:48:50 +00:00
|
|
|
|
2013-06-04 09:35:33 +00:00
|
|
|
buildInputs = [
|
2020-09-07 15:48:50 +00:00
|
|
|
alsaLib
|
|
|
|
expat
|
|
|
|
ffmpeg
|
|
|
|
file
|
|
|
|
flac
|
|
|
|
libid3tag
|
|
|
|
libjack2
|
|
|
|
libmad
|
|
|
|
libopus
|
|
|
|
libsndfile
|
|
|
|
libvorbis
|
|
|
|
lilv
|
|
|
|
lv2
|
|
|
|
pcre
|
|
|
|
serd
|
|
|
|
sord
|
|
|
|
soundtouch
|
|
|
|
soxr
|
2021-05-07 11:38:50 +00:00
|
|
|
sqlite
|
2020-09-07 15:48:50 +00:00
|
|
|
sratom
|
|
|
|
suil
|
|
|
|
twolame
|
2021-05-05 11:04:07 +00:00
|
|
|
wxGTK'
|
|
|
|
wxGTK'.gtk
|
|
|
|
] ++ optionals stdenv.isLinux [
|
2020-09-07 15:48:50 +00:00
|
|
|
at-spi2-core
|
|
|
|
dbus
|
|
|
|
epoxy
|
|
|
|
libXdmcp
|
|
|
|
libXtst
|
|
|
|
libpthreadstubs
|
|
|
|
libxkbcommon
|
|
|
|
libselinux
|
|
|
|
libsepol
|
2021-05-05 11:04:07 +00:00
|
|
|
util-linux
|
2020-09-07 15:48:50 +00:00
|
|
|
];
|
2011-01-02 17:13:34 +00:00
|
|
|
|
2015-08-14 17:44:19 +00:00
|
|
|
doCheck = false; # Test fails
|
2011-01-02 17:13:34 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2009-03-30 07:33:31 +00:00
|
|
|
description = "Sound editor with graphical UI";
|
2020-08-31 10:27:36 +00:00
|
|
|
homepage = "https://www.audacityteam.org/";
|
2016-12-30 04:40:28 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-06-07 12:07:20 +00:00
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
2021-03-06 06:43:13 +00:00
|
|
|
platforms = platforms.linux;
|
2007-10-29 10:52:04 +00:00
|
|
|
};
|
|
|
|
}
|