ardour: run treefmt
This commit is contained in:
parent
1d36d44d81
commit
b183133011
@ -62,175 +62,179 @@
|
|||||||
optimize ? true, # disable to print Lua DSP script output to stdout
|
optimize ? true, # disable to print Lua DSP script output to stdout
|
||||||
videoSupport ? true,
|
videoSupport ? true,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: let
|
stdenv.mkDerivation (
|
||||||
majorVersion = lib.versions.major finalAttrs.version;
|
finalAttrs:
|
||||||
in {
|
let
|
||||||
pname = "ardour";
|
majorVersion = lib.versions.major finalAttrs.version;
|
||||||
version = "8.12";
|
in
|
||||||
|
{
|
||||||
|
pname = "ardour";
|
||||||
|
version = "8.12";
|
||||||
|
|
||||||
# We can't use `fetchFromGitea` here, as attempting to fetch release archives from git.ardour.org
|
# 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.
|
# result in an empty archive. See https://tracker.ardour.org/view.php?id=7328 for more info.
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "git://git.ardour.org/ardour/ardour.git";
|
url = "git://git.ardour.org/ardour/ardour.git";
|
||||||
rev = finalAttrs.version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-4IgBQ53cwPA35YwNQyo+qBqsMGv+TLn6w1zaDX97erE=";
|
hash = "sha256-4IgBQ53cwPA35YwNQyo+qBqsMGv+TLn6w1zaDX97erE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
bundledContent = fetchzip {
|
bundledContent = fetchzip {
|
||||||
url = "https://web.archive.org/web/20221026200824/http://stuff.ardour.org/loops/ArdourBundledMedia.zip";
|
url = "https://web.archive.org/web/20221026200824/http://stuff.ardour.org/loops/ArdourBundledMedia.zip";
|
||||||
hash = "sha256-IbPQWFeyMuvCoghFl1ZwZNNcSvLNsH84rGArXnw+t7A=";
|
hash = "sha256-IbPQWFeyMuvCoghFl1ZwZNNcSvLNsH84rGArXnw+t7A=";
|
||||||
# archive does not contain a single folder at the root
|
# archive does not contain a single folder at the root
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
|
# AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
|
||||||
./as-flags.patch
|
./as-flags.patch
|
||||||
./default-plugin-search-paths.patch
|
./default-plugin-search-paths.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
# Ardour's wscript requires git revision and date to be available.
|
# Ardour's wscript requires git revision and date to be available.
|
||||||
# Since they are not, let's generate the file manually.
|
# Since they are not, let's generate the file manually.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = "${finalAttrs.version}"; const char* date = ""; }\n' > libs/ardour/revision.cc
|
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = "${finalAttrs.version}"; const char* date = ""; }\n' > libs/ardour/revision.cc
|
||||||
sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
|
sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
|
||||||
patchShebangs ./tools/
|
patchShebangs ./tools/
|
||||||
substituteInPlace libs/ardour/video_tools_paths.cc \
|
substituteInPlace libs/ardour/video_tools_paths.cc \
|
||||||
--replace-fail 'ffmpeg_exe = X_("");' 'ffmpeg_exe = X_("${ffmpeg}/bin/ffmpeg");' \
|
--replace-fail 'ffmpeg_exe = X_("");' 'ffmpeg_exe = X_("${ffmpeg}/bin/ffmpeg");' \
|
||||||
--replace-fail 'ffprobe_exe = X_("");' 'ffprobe_exe = X_("${ffmpeg}/bin/ffprobe");'
|
--replace-fail 'ffprobe_exe = X_("");' 'ffprobe_exe = X_("${ffmpeg}/bin/ffprobe");'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
doxygen
|
doxygen
|
||||||
graphviz # for dot
|
graphviz # for dot
|
||||||
itstool
|
|
||||||
makeWrapper
|
|
||||||
perl
|
|
||||||
pkg-config
|
|
||||||
python3
|
|
||||||
wafHook
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs =
|
|
||||||
[
|
|
||||||
alsa-lib
|
|
||||||
aubio
|
|
||||||
boost
|
|
||||||
cairomm
|
|
||||||
cppunit
|
|
||||||
curl
|
|
||||||
dbus
|
|
||||||
ffmpeg
|
|
||||||
fftw
|
|
||||||
fftwSinglePrec
|
|
||||||
flac
|
|
||||||
fluidsynth
|
|
||||||
glibmm
|
|
||||||
gtkmm2
|
|
||||||
hidapi
|
|
||||||
itstool
|
itstool
|
||||||
kissfft
|
makeWrapper
|
||||||
libarchive
|
|
||||||
libjack2
|
|
||||||
liblo
|
|
||||||
libltc
|
|
||||||
libogg
|
|
||||||
libpulseaudio
|
|
||||||
librdf_rasqal
|
|
||||||
libsamplerate
|
|
||||||
libsigcxx
|
|
||||||
libsndfile
|
|
||||||
libusb1
|
|
||||||
libuv
|
|
||||||
libwebsockets
|
|
||||||
libxml2
|
|
||||||
libxslt
|
|
||||||
lilv
|
|
||||||
lrdf
|
|
||||||
lv2
|
|
||||||
pango
|
|
||||||
perl
|
perl
|
||||||
|
pkg-config
|
||||||
python3
|
python3
|
||||||
qm-dsp
|
wafHook
|
||||||
readline
|
|
||||||
rubberband
|
|
||||||
serd
|
|
||||||
sord
|
|
||||||
soundtouch
|
|
||||||
sratom
|
|
||||||
suil
|
|
||||||
taglib
|
|
||||||
vamp-plugin-sdk
|
|
||||||
]
|
|
||||||
++ lib.optionals videoSupport [
|
|
||||||
harvid
|
|
||||||
xjadeo
|
|
||||||
];
|
];
|
||||||
|
|
||||||
wafConfigureFlags = [
|
buildInputs =
|
||||||
"--cxx17"
|
[
|
||||||
"--docs"
|
alsa-lib
|
||||||
"--freedesktop"
|
aubio
|
||||||
"--no-phone-home"
|
boost
|
||||||
"--ptformat"
|
cairomm
|
||||||
"--run-tests"
|
cppunit
|
||||||
"--test"
|
curl
|
||||||
# since we don't have https://github.com/agfline/LibAAF yet,
|
dbus
|
||||||
# we need to use some of ardours internal libs, see:
|
ffmpeg
|
||||||
# https://discourse.ardour.org/t/ardour-8-2-released/109615/6
|
fftw
|
||||||
# and
|
fftwSinglePrec
|
||||||
# https://discourse.ardour.org/t/ardour-8-2-released/109615/8
|
flac
|
||||||
# "--use-external-libs"
|
fluidsynth
|
||||||
] ++ lib.optional optimize "--optimize";
|
glibmm
|
||||||
|
gtkmm2
|
||||||
|
hidapi
|
||||||
|
itstool
|
||||||
|
kissfft
|
||||||
|
libarchive
|
||||||
|
libjack2
|
||||||
|
liblo
|
||||||
|
libltc
|
||||||
|
libogg
|
||||||
|
libpulseaudio
|
||||||
|
librdf_rasqal
|
||||||
|
libsamplerate
|
||||||
|
libsigcxx
|
||||||
|
libsndfile
|
||||||
|
libusb1
|
||||||
|
libuv
|
||||||
|
libwebsockets
|
||||||
|
libxml2
|
||||||
|
libxslt
|
||||||
|
lilv
|
||||||
|
lrdf
|
||||||
|
lv2
|
||||||
|
pango
|
||||||
|
perl
|
||||||
|
python3
|
||||||
|
qm-dsp
|
||||||
|
readline
|
||||||
|
rubberband
|
||||||
|
serd
|
||||||
|
sord
|
||||||
|
soundtouch
|
||||||
|
sratom
|
||||||
|
suil
|
||||||
|
taglib
|
||||||
|
vamp-plugin-sdk
|
||||||
|
]
|
||||||
|
++ lib.optionals videoSupport [
|
||||||
|
harvid
|
||||||
|
xjadeo
|
||||||
|
];
|
||||||
|
|
||||||
postInstall =
|
wafConfigureFlags = [
|
||||||
''
|
"--cxx17"
|
||||||
# wscript does not install these for some reason
|
"--docs"
|
||||||
install -vDm 644 "build/gtk2_ardour/ardour.xml" \
|
"--freedesktop"
|
||||||
-t "$out/share/mime/packages"
|
"--no-phone-home"
|
||||||
install -vDm 644 "build/gtk2_ardour/ardour${majorVersion}.desktop" \
|
"--ptformat"
|
||||||
-t "$out/share/applications"
|
"--run-tests"
|
||||||
for size in 16 22 32 48 256 512; do
|
"--test"
|
||||||
install -vDm 644 "gtk2_ardour/resources/Ardour-icon_''${size}px.png" \
|
# since we don't have https://github.com/agfline/LibAAF yet,
|
||||||
"$out/share/icons/hicolor/''${size}x''${size}/apps/ardour${majorVersion}.png"
|
# we need to use some of ardours internal libs, see:
|
||||||
done
|
# https://discourse.ardour.org/t/ardour-8-2-released/109615/6
|
||||||
install -vDm 644 "ardour.1"* -t "$out/share/man/man1"
|
# and
|
||||||
|
# https://discourse.ardour.org/t/ardour-8-2-released/109615/8
|
||||||
|
# "--use-external-libs"
|
||||||
|
] ++ lib.optional optimize "--optimize";
|
||||||
|
|
||||||
# install additional bundled beats, chords and progressions
|
postInstall =
|
||||||
cp -rp "${finalAttrs.bundledContent}"/* "$out/share/ardour${majorVersion}/media"
|
''
|
||||||
''
|
# wscript does not install these for some reason
|
||||||
+ lib.optionalString videoSupport ''
|
install -vDm 644 "build/gtk2_ardour/ardour.xml" \
|
||||||
# `harvid` and `xjadeo` must be accessible in `PATH` for video to work.
|
-t "$out/share/mime/packages"
|
||||||
wrapProgram "$out/bin/ardour${majorVersion}" \
|
install -vDm 644 "build/gtk2_ardour/ardour${majorVersion}.desktop" \
|
||||||
--prefix PATH : "${
|
-t "$out/share/applications"
|
||||||
lib.makeBinPath [
|
for size in 16 22 32 48 256 512; do
|
||||||
harvid
|
install -vDm 644 "gtk2_ardour/resources/Ardour-icon_''${size}px.png" \
|
||||||
xjadeo
|
"$out/share/icons/hicolor/''${size}x''${size}/apps/ardour${majorVersion}.png"
|
||||||
]
|
done
|
||||||
}"
|
install -vDm 644 "ardour.1"* -t "$out/share/man/man1"
|
||||||
'';
|
|
||||||
|
|
||||||
LINKFLAGS = "-lpthread";
|
# install additional bundled beats, chords and progressions
|
||||||
|
cp -rp "${finalAttrs.bundledContent}"/* "$out/share/ardour${majorVersion}/media"
|
||||||
|
''
|
||||||
|
+ lib.optionalString videoSupport ''
|
||||||
|
# `harvid` and `xjadeo` must be accessible in `PATH` for video to work.
|
||||||
|
wrapProgram "$out/bin/ardour${majorVersion}" \
|
||||||
|
--prefix PATH : "${
|
||||||
|
lib.makeBinPath [
|
||||||
|
harvid
|
||||||
|
xjadeo
|
||||||
|
]
|
||||||
|
}"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
LINKFLAGS = "-lpthread";
|
||||||
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:
|
meta = {
|
||||||
https://community.ardour.org/donate
|
description = "Multi-track hard disk recording software";
|
||||||
'';
|
longDescription = ''
|
||||||
homepage = "https://ardour.org/";
|
Ardour is a digital audio workstation (DAW), You can use it to
|
||||||
license = lib.licenses.gpl2Plus;
|
record, edit and mix multi-track audio and midi. Produce your
|
||||||
mainProgram = "ardour8";
|
own CDs. Mix video soundtracks. Experiment with new ideas about
|
||||||
platforms = lib.platforms.linux;
|
music and sound.
|
||||||
maintainers = with lib.maintainers; [
|
|
||||||
magnetophon
|
Please consider supporting the ardour project financially:
|
||||||
mitchmindtree
|
https://community.ardour.org/donate
|
||||||
ryand56
|
'';
|
||||||
];
|
homepage = "https://ardour.org/";
|
||||||
};
|
license = lib.licenses.gpl2Plus;
|
||||||
})
|
mainProgram = "ardour8";
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
maintainers = with lib.maintainers; [
|
||||||
|
magnetophon
|
||||||
|
mitchmindtree
|
||||||
|
ryand56
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user