nixpkgs/pkgs/applications/audio/ardour/default.nix
2014-11-21 23:23:39 +01:00

78 lines
2.7 KiB
Nix

{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jack2
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
, perl, pkgconfig, python, serd, sord, sratom, suil }:
let
tag = "3.5.403";
in
stdenv.mkDerivation rec {
name = "ardour-${tag}";
src = fetchgit {
url = git://git.ardour.org/ardour/ardour.git;
rev = "refs/tags/${tag}";
sha256 = "7d7c8e2c7ccccca6c8324fd874509e1b0d89f3f42cb92982c50d212797463f4c";
};
buildInputs =
[ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
glibmm gtk gtkmm jack2 libgnomecanvas libgnomecanvasmm liblo
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
makeWrapper pango perl pkgconfig python serd sord sratom suil
];
patchPhase = ''
# The funny revision number is from `git describe rev`
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-g2f6065b\"; }\n' > libs/ardour/revision.cc
# Note the different version number
sed -i '33i rev = \"3.5-380-g2f6065b\"' wscript
sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
'';
configurePhase = "python waf configure --optimize --prefix=$out";
buildPhase = "python waf";
# For the custom ardour clearlooks gtk-engine to work, it must be
# moved to a directory called "engines" and added to GTK_PATH
installPhase = ''
python waf install
mkdir -pv $out/gtk2/engines
cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
# Install desktop file
mkdir -p "$out/share/applications"
cat > "$out/share/applications/ardour.desktop" << EOF
[Desktop Entry]
Name=Ardour 3
GenericName=Digital Audio Workstation
Comment=Multitrack harddisk recorder
Exec=$out/bin/ardour3
Icon=$out/share/ardour3/icons/ardour_icon_256px.png
Terminal=false
Type=Application
X-MultipleArgs=false
Categories=GTK;Audio;AudioVideoEditing;AudioVideo;Video;
EOF
'';
meta = with stdenv.lib; {
description = "Multi-track hard disk recording software";
longDescription = ''
Also read "The importance of Paying Something" on their homepage, please!
'';
homepage = http://ardour.org/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
};
}