nixpkgs/pkgs/applications/audio/ardour/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

220 lines
5.1 KiB
Nix
Raw Normal View History

2022-11-09 19:46:13 +00:00
{ lib
, stdenv
2020-04-06 02:28:15 +00:00
, fetchgit
2022-11-09 19:46:13 +00:00
, fetchzip
, alsa-lib
2020-04-06 02:28:15 +00:00
, aubio
, boost
, cairomm
, cppunit
2020-04-06 02:28:15 +00:00
, curl
, dbus
2020-04-06 02:28:15 +00:00
, doxygen
2021-05-22 00:18:32 +00:00
, ffmpeg
, fftw
2020-04-06 02:28:15 +00:00
, fftwSinglePrec
, flac
2023-10-26 20:39:37 +00:00
, fluidsynth
2020-04-06 02:28:15 +00:00
, glibc
, glibmm
, graphviz
, gtkmm2
, harvid
2023-10-26 20:39:37 +00:00
, hidapi
, itstool
2023-10-26 20:39:37 +00:00
, kissfft
, libarchive
2020-04-06 02:28:15 +00:00
, libjack2
, liblo
2023-10-26 20:39:37 +00:00
, libltc
2020-04-06 02:28:15 +00:00
, libogg
, libpulseaudio
, librdf_raptor
, librdf_rasqal
2020-04-06 02:28:15 +00:00
, libsamplerate
, libsigcxx
, libsndfile
, libusb1
, libuv
, libwebsockets
2020-04-06 02:28:15 +00:00
, libxml2
, libxslt
2020-04-06 02:28:15 +00:00
, lilv
, lrdf
, lv2
, makeWrapper
, pango
2020-04-06 02:28:15 +00:00
, perl
, pkg-config
, python3
2023-10-26 20:39:37 +00:00
, qm-dsp
, readline
2020-04-06 02:28:15 +00:00
, rubberband
, serd
, sord
2020-10-06 12:30:24 +00:00
, soundtouch
2020-04-06 02:28:15 +00:00
, sratom
, suil
2020-04-06 02:28:15 +00:00
, taglib
, vamp-plugin-sdk
2023-09-03 00:24:44 +00:00
, wafHook
, xjadeo
, optimize ? true # disable to print Lua DSP script output to stdout
, videoSupport ? true
2020-04-06 02:28:15 +00:00
}:
stdenv.mkDerivation rec {
pname = "ardour";
2024-03-02 17:33:32 +00:00
version = "8.4";
2022-11-09 19:46:13 +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.
2016-10-04 18:15:18 +00:00
src = fetchgit {
url = "git://git.ardour.org/ardour/ardour.git";
rev = version;
2024-03-02 17:33:32 +00:00
hash = "sha256-6qx/elkj4Kb4YK1JZG/S036WdUO7wEE6/yf4pZQP8J0=";
2022-11-09 19:46:13 +00:00
};
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;
};
patches = [
# AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
./as-flags.patch
./default-plugin-search-paths.patch
];
2022-11-09 19:46:13 +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-06 02:28:15 +00:00
nativeBuildInputs = [
doxygen
graphviz # for dot
itstool
makeWrapper
perl
pkg-config
python3
2023-09-03 00:24:44 +00:00
wafHook
2020-04-06 02:28:15 +00:00
];
2020-04-06 02:28:15 +00:00
buildInputs = [
alsa-lib
2020-04-06 02:28:15 +00:00
aubio
boost
cairomm
cppunit
2020-04-06 02:28:15 +00:00
curl
dbus
2021-05-22 00:18:32 +00:00
ffmpeg
2020-04-06 02:28:15 +00:00
fftw
fftwSinglePrec
flac
2023-10-26 20:39:37 +00:00
fluidsynth
2020-04-06 02:28:15 +00:00
glibmm
gtkmm2
2023-10-26 20:39:37 +00:00
hidapi
itstool
2023-10-26 20:39:37 +00:00
kissfft
libarchive
2020-04-06 02:28:15 +00:00
libjack2
liblo
2023-10-26 20:39:37 +00:00
libltc
2020-04-06 02:28:15 +00:00
libogg
libpulseaudio
librdf_raptor
librdf_rasqal
2020-04-06 02:28:15 +00:00
libsamplerate
libsigcxx
libsndfile
libusb1
libuv
libwebsockets
2020-04-06 02:28:15 +00:00
libxml2
libxslt
2020-04-06 02:28:15 +00:00
lilv
lrdf
lv2
pango
perl
python3
2023-10-26 20:39:37 +00:00
qm-dsp
readline
2020-04-06 02:28:15 +00:00
rubberband
serd
sord
2020-10-06 12:30:24 +00:00
soundtouch
2020-04-06 02:28:15 +00:00
sratom
suil
taglib
vamp-plugin-sdk
] ++ lib.optionals videoSupport [ harvid xjadeo ];
wafConfigureFlags = [
"--cxx11"
"--docs"
"--freedesktop"
"--no-phone-home"
"--ptformat"
"--run-tests"
"--test"
2023-12-23 15:30:56 +00:00
# since we don't have https://github.com/agfline/LibAAF yet,
# we need to use some of ardours internal libs, see:
# https://discourse.ardour.org/t/ardour-8-2-released/109615/6
# and
# https://discourse.ardour.org/t/ardour-8-2-released/109615/8
# "--use-external-libs"
] ++ lib.optional optimize "--optimize";
postInstall = ''
# wscript does not install these for some reason
install -vDm 644 "build/gtk2_ardour/ardour.xml" \
-t "$out/share/mime/packages"
2022-11-09 19:46:13 +00:00
install -vDm 644 "build/gtk2_ardour/ardour${lib.versions.major version}.desktop" \
-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-09 19:46:13 +00:00
"$out/share/icons/hicolor/''${size}x''${size}/apps/ardour${lib.versions.major version}.png"
done
install -vDm 644 "ardour.1"* -t "$out/share/man/man1"
2022-11-09 19:46:13 +00:00
# install additional bundled beats, chords and progressions
cp -rp "${bundledContent}"/* "$out/share/ardour${lib.versions.major version}/media"
'' + lib.optionalString videoSupport ''
# `harvid` and `xjadeo` must be accessible in `PATH` for video to work.
2022-11-09 19:46:13 +00:00
wrapProgram "$out/bin/ardour${lib.versions.major version}" \
--prefix PATH : "${lib.makeBinPath [ harvid xjadeo ]}"
'';
LINKFLAGS = "-lpthread";
meta = with lib; {
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:
https://community.ardour.org/donate
'';
homepage = "https://ardour.org/";
license = licenses.gpl2Plus;
2023-10-26 20:39:10 +00:00
mainProgram = "ardour8";
platforms = platforms.linux;
maintainers = with maintainers; [ goibhniu magnetophon mitchmindtree ];
};
}