2020-09-07 16:48:50 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, cmake
|
|
|
|
, wxGTK
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, gettext
|
|
|
|
, file
|
|
|
|
, libvorbis
|
|
|
|
, libmad
|
|
|
|
, libjack2
|
|
|
|
, lv2
|
|
|
|
, lilv
|
|
|
|
, serd
|
|
|
|
, sord
|
|
|
|
, sratom
|
|
|
|
, suil
|
|
|
|
, alsaLib
|
|
|
|
, libsndfile
|
|
|
|
, soxr
|
|
|
|
, flac
|
|
|
|
, twolame
|
|
|
|
, expat
|
|
|
|
, libid3tag
|
|
|
|
, libopus
|
|
|
|
, ffmpeg
|
|
|
|
, soundtouch
|
|
|
|
, pcre /*, portaudio - given up fighting their portaudio.patch */
|
|
|
|
, at-spi2-core ? null
|
|
|
|
, dbus ? null
|
|
|
|
, epoxy ? null
|
|
|
|
, libXdmcp ? null
|
|
|
|
, libXtst ? null
|
|
|
|
, libpthreadstubs ? null
|
|
|
|
, libselinux ? null
|
|
|
|
, libsepol ? null
|
|
|
|
, libxkbcommon ? null
|
|
|
|
, utillinux ? null
|
2020-12-23 11:55:58 +00:00
|
|
|
}:
|
2007-10-29 10:52:04 +00:00
|
|
|
|
2020-09-07 16:48:50 +01:00
|
|
|
# TODO
|
|
|
|
# - 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
|
|
|
|
# - detach sbsms
|
2016-12-30 04:40:28 +00:00
|
|
|
|
2011-01-02 17:13:34 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "audacity";
|
2020-09-07 16:48:50 +01:00
|
|
|
version = "2.4.2";
|
2009-03-30 08:33:31 +01:00
|
|
|
|
2020-09-07 16:48:50 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "audacity";
|
|
|
|
repo = "audacity";
|
|
|
|
rev = "Audacity-${version}";
|
|
|
|
sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI=";
|
2009-03-30 08:33:31 +01:00
|
|
|
};
|
2013-06-04 10:35:33 +01:00
|
|
|
|
2020-09-07 16:48:50 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch";
|
|
|
|
sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc=";
|
|
|
|
name = "audacity_xdg_paths.patch";
|
|
|
|
})
|
2016-12-30 04:40:28 +00:00
|
|
|
];
|
|
|
|
|
2020-09-07 16:48:50 +01:00
|
|
|
# this file *should* be generated by cmake but as of 2.4.2 isn't yet
|
|
|
|
postPatch = ''
|
|
|
|
touch src/RevisionIdent.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
# workaround for a broken cmake. Drop it with a later version to see if it works.
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/94905
|
|
|
|
cmakeFlags = lib.optional stdenv.isLinux "-DCMAKE_OSX_ARCHITECTURES=";
|
|
|
|
|
|
|
|
# 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
|
|
|
# ffmpeg
|
|
|
|
"-lavcodec"
|
|
|
|
"-lavdevice"
|
|
|
|
"-lavfilter"
|
|
|
|
"-lavformat"
|
|
|
|
"-lavresample"
|
|
|
|
"-lavutil"
|
|
|
|
"-lpostproc"
|
|
|
|
"-lswresample"
|
|
|
|
"-lswscale"
|
|
|
|
];
|
2015-09-29 22:02:46 +01:00
|
|
|
|
2020-09-07 16:48:50 +01:00
|
|
|
nativeBuildInputs = [ cmake gettext pkg-config python3 ];
|
|
|
|
|
2013-06-04 10:35:33 +01:00
|
|
|
buildInputs = [
|
2020-09-07 16:48:50 +01:00
|
|
|
alsaLib
|
|
|
|
expat
|
|
|
|
ffmpeg
|
|
|
|
file
|
|
|
|
flac
|
|
|
|
libid3tag
|
|
|
|
libjack2
|
|
|
|
libmad
|
|
|
|
libopus
|
|
|
|
libsndfile
|
|
|
|
libvorbis
|
|
|
|
lilv
|
|
|
|
lv2
|
|
|
|
pcre
|
|
|
|
serd
|
|
|
|
sord
|
|
|
|
soundtouch
|
|
|
|
soxr
|
|
|
|
sratom
|
|
|
|
suil
|
|
|
|
twolame
|
|
|
|
wxGTK
|
|
|
|
wxGTK.gtk
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
at-spi2-core
|
|
|
|
dbus
|
|
|
|
epoxy
|
|
|
|
libXdmcp
|
|
|
|
libXtst
|
|
|
|
libpthreadstubs
|
|
|
|
libxkbcommon
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
utillinux
|
|
|
|
];
|
2011-01-02 17:13:34 +00:00
|
|
|
|
2015-08-14 18:44:19 +01: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 08:33:31 +01:00
|
|
|
description = "Sound editor with graphical UI";
|
2020-08-31 11:27:36 +01:00
|
|
|
homepage = "https://www.audacityteam.org/";
|
2016-12-30 04:40:28 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-06-07 13:07:20 +01:00
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
2019-11-13 09:45:21 +00:00
|
|
|
platforms = intersectLists platforms.linux platforms.x86; # fails on ARM
|
2007-10-29 10:52:04 +00:00
|
|
|
};
|
|
|
|
}
|