2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchgit
|
2022-11-21 17:40:18 +00:00
|
|
|
, fetchzip
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, aubio
|
|
|
|
, boost
|
|
|
|
, cairomm
|
2020-06-02 18:00:15 +00:00
|
|
|
, cppunit
|
2020-04-24 23:36:52 +00:00
|
|
|
, curl
|
2020-06-02 18:00:15 +00:00
|
|
|
, dbus
|
2020-04-24 23:36:52 +00:00
|
|
|
, doxygen
|
2021-05-28 09:39:13 +00:00
|
|
|
, ffmpeg
|
2020-06-02 18:00:15 +00:00
|
|
|
, fftw
|
2020-04-24 23:36:52 +00:00
|
|
|
, fftwSinglePrec
|
|
|
|
, flac
|
|
|
|
, glibc
|
|
|
|
, glibmm
|
|
|
|
, graphviz
|
|
|
|
, gtkmm2
|
2021-03-23 19:22:30 +00:00
|
|
|
, harvid
|
2020-06-02 18:00:15 +00:00
|
|
|
, itstool
|
|
|
|
, libarchive
|
2020-04-24 23:36:52 +00:00
|
|
|
, libjack2
|
|
|
|
, liblo
|
|
|
|
, libogg
|
2020-06-02 18:00:15 +00:00
|
|
|
, libpulseaudio
|
|
|
|
, librdf_raptor
|
|
|
|
, librdf_rasqal
|
2020-04-24 23:36:52 +00:00
|
|
|
, libsamplerate
|
|
|
|
, libsigcxx
|
|
|
|
, libsndfile
|
|
|
|
, libusb1
|
2020-06-02 18:00:15 +00:00
|
|
|
, libuv
|
|
|
|
, libwebsockets
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
2020-06-02 18:00:15 +00:00
|
|
|
, libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
, lilv
|
|
|
|
, lrdf
|
|
|
|
, lv2
|
2021-03-23 19:22:30 +00:00
|
|
|
, makeWrapper
|
2020-06-02 18:00:15 +00:00
|
|
|
, pango
|
2020-04-24 23:36:52 +00:00
|
|
|
, perl
|
|
|
|
, pkg-config
|
2020-06-02 18:00:15 +00:00
|
|
|
, python3
|
|
|
|
, readline
|
2020-04-24 23:36:52 +00:00
|
|
|
, rubberband
|
|
|
|
, serd
|
|
|
|
, sord
|
2020-11-06 00:33:48 +00:00
|
|
|
, soundtouch
|
2020-04-24 23:36:52 +00:00
|
|
|
, sratom
|
2020-06-02 18:00:15 +00:00
|
|
|
, suil
|
2020-04-24 23:36:52 +00:00
|
|
|
, taglib
|
|
|
|
, vamp-plugin-sdk
|
|
|
|
, wafHook
|
2021-03-23 19:22:30 +00:00
|
|
|
, xjadeo
|
2021-12-06 16:07:01 +00:00
|
|
|
, videoSupport ? true
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2020-06-02 18:00:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ardour";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# We can't use `fetchFromGitea` here, as attempting to fetch release archives from git.ardour.org
|
|
|
|
# result in an empty archive. See https://tracker.ardour.org/view.php?id=7328 for more info.
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.ardour.org/ardour/ardour.git";
|
2020-06-02 18:00:15 +00:00
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-eLF9n71tjdPA+ks0B8UonmPZqRgcZEA7ok79+m9PioU=";
|
|
|
|
};
|
|
|
|
|
|
|
|
bundledContent = fetchzip {
|
|
|
|
url = "https://web.archive.org/web/20221026200824/http://stuff.ardour.org/loops/ArdourBundledMedia.zip";
|
|
|
|
hash = "sha256-IbPQWFeyMuvCoghFl1ZwZNNcSvLNsH84rGArXnw+t7A=";
|
|
|
|
# archive does not contain a single folder at the root
|
|
|
|
stripRoot = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
patches = [
|
|
|
|
# AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
|
|
|
|
./as-flags.patch
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# Ardour's wscript requires git revision and date to be available.
|
|
|
|
# Since they are not, let's generate the file manually.
|
|
|
|
postPatch = ''
|
|
|
|
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = "${version}"; const char* date = ""; }\n' > libs/ardour/revision.cc
|
|
|
|
sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
|
|
|
|
patchShebangs ./tools/
|
|
|
|
substituteInPlace libs/ardour/video_tools_paths.cc \
|
|
|
|
--replace 'ffmpeg_exe = X_("");' 'ffmpeg_exe = X_("${ffmpeg}/bin/ffmpeg");' \
|
|
|
|
--replace 'ffprobe_exe = X_("");' 'ffprobe_exe = X_("${ffmpeg}/bin/ffprobe");'
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
doxygen
|
|
|
|
graphviz # for dot
|
2020-06-02 18:00:15 +00:00
|
|
|
itstool
|
2021-03-23 19:22:30 +00:00
|
|
|
makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
perl
|
2020-06-02 18:00:15 +00:00
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wafHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
aubio
|
|
|
|
boost
|
|
|
|
cairomm
|
2020-06-02 18:00:15 +00:00
|
|
|
cppunit
|
2020-04-24 23:36:52 +00:00
|
|
|
curl
|
|
|
|
dbus
|
2021-05-28 09:39:13 +00:00
|
|
|
ffmpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
fftw
|
|
|
|
fftwSinglePrec
|
|
|
|
flac
|
|
|
|
glibmm
|
|
|
|
gtkmm2
|
2020-06-02 18:00:15 +00:00
|
|
|
itstool
|
|
|
|
libarchive
|
2020-04-24 23:36:52 +00:00
|
|
|
libjack2
|
|
|
|
liblo
|
|
|
|
libogg
|
2020-06-02 18:00:15 +00:00
|
|
|
libpulseaudio
|
|
|
|
librdf_raptor
|
|
|
|
librdf_rasqal
|
2020-04-24 23:36:52 +00:00
|
|
|
libsamplerate
|
|
|
|
libsigcxx
|
|
|
|
libsndfile
|
|
|
|
libusb1
|
2020-06-02 18:00:15 +00:00
|
|
|
libuv
|
|
|
|
libwebsockets
|
2020-04-24 23:36:52 +00:00
|
|
|
libxml2
|
2020-06-02 18:00:15 +00:00
|
|
|
libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
lilv
|
|
|
|
lrdf
|
|
|
|
lv2
|
|
|
|
pango
|
2020-06-02 18:00:15 +00:00
|
|
|
perl
|
|
|
|
python3
|
|
|
|
readline
|
2020-04-24 23:36:52 +00:00
|
|
|
rubberband
|
|
|
|
serd
|
|
|
|
sord
|
2020-11-06 00:33:48 +00:00
|
|
|
soundtouch
|
2020-04-24 23:36:52 +00:00
|
|
|
sratom
|
|
|
|
suil
|
|
|
|
taglib
|
|
|
|
vamp-plugin-sdk
|
2021-03-23 19:22:30 +00:00
|
|
|
] ++ lib.optionals videoSupport [ harvid xjadeo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
wafConfigureFlags = [
|
2020-06-02 18:00:15 +00:00
|
|
|
"--cxx11"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--docs"
|
|
|
|
"--freedesktop"
|
2020-06-02 18:00:15 +00:00
|
|
|
"--no-phone-home"
|
|
|
|
"--optimize"
|
|
|
|
"--ptformat"
|
|
|
|
"--run-tests"
|
|
|
|
"--test"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2020-11-06 00:33:48 +00:00
|
|
|
# removed because it fixes https://tracker.ardour.org/view.php?id=8161 and https://tracker.ardour.org/view.php?id=8437
|
|
|
|
# "--use-external-libs"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# wscript does not install these for some reason
|
|
|
|
install -vDm 644 "build/gtk2_ardour/ardour.xml" \
|
|
|
|
-t "$out/share/mime/packages"
|
2022-11-21 17:40:18 +00:00
|
|
|
install -vDm 644 "build/gtk2_ardour/ardour${lib.versions.major version}.desktop" \
|
2020-04-24 23:36:52 +00:00
|
|
|
-t "$out/share/applications"
|
|
|
|
for size in 16 22 32 48 256 512; do
|
|
|
|
install -vDm 644 "gtk2_ardour/resources/Ardour-icon_''${size}px.png" \
|
2022-11-21 17:40:18 +00:00
|
|
|
"$out/share/icons/hicolor/''${size}x''${size}/apps/ardour${lib.versions.major version}.png"
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
install -vDm 644 "ardour.1"* -t "$out/share/man/man1"
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
# install additional bundled beats, chords and progressions
|
|
|
|
cp -rp "${bundledContent}"/* "$out/share/ardour${lib.versions.major version}/media"
|
2021-03-23 19:22:30 +00:00
|
|
|
'' + lib.optionalString videoSupport ''
|
|
|
|
# `harvid` and `xjadeo` must be accessible in `PATH` for video to work.
|
2022-11-21 17:40:18 +00:00
|
|
|
wrapProgram "$out/bin/ardour${lib.versions.major version}" \
|
2021-03-23 19:22:30 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ harvid xjadeo ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
LINKFLAGS = "-lpthread";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Multi-track hard disk recording software";
|
|
|
|
longDescription = ''
|
|
|
|
Ardour is a digital audio workstation (DAW), You can use it to
|
|
|
|
record, edit and mix multi-track audio and midi. Produce your
|
|
|
|
own CDs. Mix video soundtracks. Experiment with new ideas about
|
|
|
|
music and sound.
|
|
|
|
|
|
|
|
Please consider supporting the ardour project financially:
|
2020-06-02 18:00:15 +00:00
|
|
|
https://community.ardour.org/donate
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2020-06-02 18:00:15 +00:00
|
|
|
homepage = "https://ardour.org/";
|
2021-03-23 19:22:30 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-03-23 19:22:30 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu magnetophon mitchmindtree ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|