61 stdenv.mkDerivation rec {
65 # We can't use `fetchFromGitea` here, as attempting to fetch release archives from git.ardour.org
66 # result in an empty archive. See https://tracker.ardour.org/view.php?id=7328 for more info.
68 url = "git://git.ardour.org/ardour/ardour.git";
70 hash = "sha256-cmYt6fGYuuVs6YhAXaO9AG6TrYLDVUaE1/iC67rt76I=";
73 bundledContent = fetchzip {
74 url = "https://web.archive.org/web/20221026200824/http://stuff.ardour.org/loops/ArdourBundledMedia.zip";
75 hash = "sha256-IbPQWFeyMuvCoghFl1ZwZNNcSvLNsH84rGArXnw+t7A=";
76 # archive does not contain a single folder at the root
81 # AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
83 ./default-plugin-search-paths.patch
85 # Fix build with libxml2 2.12.
87 url = "https://github.com/Ardour/ardour/commit/e995daa37529715214c6c4a2587e4134aaaba02f.patch";
88 hash = "sha256-EpXOIIObOwwcNgNma0E3nvaBad3930sagDjBpa+78WI=";
91 # Work around itstools bug #9648
93 url = "https://github.com/Ardour/ardour/commit/338cd09a4aa1b36b8095dfc14ab534395f9a4a92.patch?full_index=1";
94 hash = "sha256-AvV4aLdkfrxPkE4NX2ETSagq4GjEC+sHCEqdcYvL+CY=";
98 # Ardour's wscript requires git revision and date to be available.
99 # Since they are not, let's generate the file manually.
101 printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = "${version}"; const char* date = ""; }\n' > libs/ardour/revision.cc
102 sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
103 patchShebangs ./tools/
104 substituteInPlace libs/ardour/video_tools_paths.cc \
105 --replace 'ffmpeg_exe = X_("");' 'ffmpeg_exe = X_("${ffmpeg}/bin/ffmpeg");' \
106 --replace 'ffprobe_exe = X_("");' 'ffprobe_exe = X_("${ffmpeg}/bin/ffprobe");'
109 nativeBuildInputs = [
165 ] ++ lib.optionals videoSupport [ harvid xjadeo ];
167 wafConfigureFlags = [
177 # removed because it fixes https://tracker.ardour.org/view.php?id=8161 and https://tracker.ardour.org/view.php?id=8437
178 # "--use-external-libs"
181 # wscript does not install these for some reason
182 install -vDm 644 "build/gtk2_ardour/ardour.xml" \
183 -t "$out/share/mime/packages"
184 install -vDm 644 "build/gtk2_ardour/ardour${lib.versions.major version}.desktop" \
185 -t "$out/share/applications"
186 for size in 16 22 32 48 256 512; do
187 install -vDm 644 "gtk2_ardour/resources/Ardour-icon_''${size}px.png" \
188 "$out/share/icons/hicolor/''${size}x''${size}/apps/ardour${lib.versions.major version}.png"
190 install -vDm 644 "ardour.1"* -t "$out/share/man/man1"
192 # install additional bundled beats, chords and progressions
193 cp -rp "${bundledContent}"/* "$out/share/ardour${lib.versions.major version}/media"
194 '' + lib.optionalString videoSupport ''
195 # `harvid` and `xjadeo` must be accessible in `PATH` for video to work.
196 wrapProgram "$out/bin/ardour${lib.versions.major version}" \
197 --prefix PATH : "${lib.makeBinPath [ harvid xjadeo ]}"
200 LINKFLAGS = "-lpthread";
203 description = "Multi-track hard disk recording software";
205 Ardour is a digital audio workstation (DAW), You can use it to
206 record, edit and mix multi-track audio and midi. Produce your
207 own CDs. Mix video soundtracks. Experiment with new ideas about
210 Please consider supporting the ardour project financially:
211 https://community.ardour.org/donate
213 homepage = "https://ardour.org/";
214 license = licenses.gpl2Plus;
215 mainProgram = "ardour7";
216 platforms = platforms.linux;
217 maintainers = with maintainers; [ magnetophon mitchmindtree ];