From eac0ee6c51086fa8573a22edc8823f6d8325a80b Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 6 Apr 2020 04:28:15 +0200 Subject: ardour: format with nixpkgs-fmt --- pkgs/applications/audio/ardour/default.nix | 123 +++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 23 deletions(-) (limited to 'pkgs/applications/audio') diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix index c1749029cdc9c..c47375d593804 100644 --- a/pkgs/applications/audio/ardour/default.nix +++ b/pkgs/applications/audio/ardour/default.nix @@ -1,14 +1,53 @@ -{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, doxygen -, fftwSinglePrec, flac, glibc, glibmm, graphviz, gtkmm2, libjack2 -, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg -, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile -, libusb, libuuid, libxml2, libxslt, lilv, lrdf, lv2, makeWrapper -, perl, pkgconfig, python2, rubberband, serd, sord, sratom -, taglib, vamp-plugin-sdk, dbus, fftw, pango, suil, libarchive -, wafHook }: - +{ stdenv +, fetchgit +, alsaLib +, aubio +, boost +, cairomm +, curl +, doxygen +, fftwSinglePrec +, flac +, glibc +, glibmm +, graphviz +, gtkmm2 +, libjack2 +, libgnomecanvas +, libgnomecanvasmm +, liblo +, libmad +, libogg +, librdf_raptor +, librdf_rasqal +, libsamplerate +, libsigcxx +, libsndfile +, libusb +, libuuid +, libxml2 +, libxslt +, lilv +, lrdf +, lv2 +, makeWrapper +, perl +, pkgconfig +, python2 +, rubberband +, serd +, sord +, sratom +, taglib +, vamp-plugin-sdk +, dbus +, fftw +, pango +, suil +, libarchive +, wafHook +}: let - # Ardour git repo uses a mix of annotated and lightweight tags. Annotated # tags are used for MAJOR.MINOR versioning, and lightweight tags are used # in-between; MAJOR.MINOR.REV where REV is the number of commits since the @@ -18,10 +57,7 @@ let # Version to build. tag = "5.12"; - -in - -stdenv.mkDerivation rec { +in stdenv.mkDerivation rec { name = "ardour-${tag}"; src = fetchgit { @@ -30,15 +66,56 @@ stdenv.mkDerivation rec { sha256 = "0mla5lm51ryikc2rrk53max2m7a5ds6i1ai921l2h95wrha45nkr"; }; - nativeBuildInputs = [ wafHook ]; - buildInputs = - [ alsaLib aubio boost cairomm curl doxygen dbus fftw fftwSinglePrec flac - glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo - libmad libogg librdf_raptor librdf_rasqal libsamplerate - libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lrdf lv2 - makeWrapper pango perl pkgconfig python2 rubberband serd sord - sratom suil taglib vamp-plugin-sdk libarchive - ]; + nativeBuildInputs = [ + wafHook + ]; + + buildInputs = [ + alsaLib + aubio + boost + cairomm + curl + doxygen + dbus + fftw + fftwSinglePrec + flac + glibmm + graphviz + gtkmm2 + libjack2 + libgnomecanvas + libgnomecanvasmm + liblo + libmad + libogg + librdf_raptor + librdf_rasqal + libsamplerate + libsigcxx + libsndfile + libusb + libuuid + libxml2 + libxslt + lilv + lrdf + lv2 + makeWrapper + pango + perl + pkgconfig + python2 + rubberband + serd + sord + sratom + suil + taglib + vamp-plugin-sdk + libarchive + ]; # ardour's wscript has a "tarball" target but that required the git revision # be available. Since this is an unzipped tarball fetched from github we -- cgit 1.4.1 From 3f7515cb8c1df47278afba776fa0933d764000ba Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 6 Apr 2020 14:00:54 +0200 Subject: ardour: clean up the expression * Remove unneeded dependencies * Stop vendoring other dependencies (fluidsynth, hidapi, libltc, qm-dsp) * Fix using incorrect libusb version (libusb package is just a legacy compat layer) * Move build-time dependencies to nativeBuildInputs * Install freedesktop files & man page * Drop libintl replacement that no longer applies --- pkgs/applications/audio/ardour/default.nix | 85 ++++++++++++++---------------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 41 insertions(+), 48 deletions(-) (limited to 'pkgs/applications/audio') diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix index c47375d593804..a17f4aa16486b 100644 --- a/pkgs/applications/audio/ardour/default.nix +++ b/pkgs/applications/audio/ardour/default.nix @@ -13,26 +13,24 @@ , graphviz , gtkmm2 , libjack2 -, libgnomecanvas -, libgnomecanvasmm , liblo -, libmad , libogg -, librdf_raptor -, librdf_rasqal , libsamplerate , libsigcxx , libsndfile -, libusb -, libuuid +, libusb1 +, fluidsynth_1 +, hidapi +, libltc +, qm-dsp , libxml2 -, libxslt , lilv , lrdf , lv2 , makeWrapper , perl -, pkgconfig +, pkg-config +, itstool , python2 , rubberband , serd @@ -68,6 +66,13 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ wafHook + makeWrapper + pkg-config + itstool + doxygen + graphviz # for dot + perl + python2 ]; buildInputs = [ @@ -76,37 +81,28 @@ in stdenv.mkDerivation rec { boost cairomm curl - doxygen dbus fftw fftwSinglePrec flac glibmm - graphviz gtkmm2 libjack2 - libgnomecanvas - libgnomecanvasmm liblo - libmad libogg - librdf_raptor - librdf_rasqal libsamplerate libsigcxx libsndfile - libusb - libuuid + libusb1 + fluidsynth_1 + hidapi + libltc + qm-dsp libxml2 - libxslt lilv lrdf lv2 - makeWrapper pango - perl - pkgconfig - python2 rubberband serd sord @@ -117,36 +113,35 @@ in stdenv.mkDerivation rec { libarchive ]; + wafConfigureFlags = [ + "--optimize" + "--docs" + "--use-external-libs" + "--freedesktop" + "--with-backends=jack,alsa,dummy" + ]; + + NIX_CFLAGS_COMPILE = "-I${qm-dsp}/include/qm-dsp"; + # ardour's wscript has a "tarball" target but that required the git revision # be available. Since this is an unzipped tarball fetched from github we # have to do that ourself. - patchPhase = '' + postPatch = '' printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-${builtins.substring 0 8 src.rev}\"; }\n' > libs/ardour/revision.cc - sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript patchShebangs ./tools/ ''; - wafConfigureFlags = [ - "--optimize" - "--docs" - "--with-backends=jack,alsa,dummy" - ]; - postInstall = '' - # Install desktop file - mkdir -p "$out/share/applications" - cat > "$out/share/applications/ardour.desktop" << EOF - [Desktop Entry] - Name=Ardour 5 - GenericName=Digital Audio Workstation - Comment=Multitrack harddisk recorder - Exec=$out/bin/ardour5 - Icon=$out/share/ardour5/resources/Ardour-icon_256px.png - Terminal=false - Type=Application - X-MultipleArgs=false - Categories=GTK;Audio;AudioVideoEditing;AudioVideo;Video; - EOF + # wscript does not install these for some reason + install -vDm 644 "build/gtk2_ardour/ardour.xml" \ + -t "$out/share/mime/packages" + install -vDm 644 "build/gtk2_ardour/ardour5.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" \ + "$out/share/icons/hicolor/''${size}x''${size}/apps/ardour5.png" + done + install -vDm 644 "ardour.1"* -t "$out/share/man/man1" ''; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ffb4b1c85e4ea..64eee32b5aa06 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18405,9 +18405,7 @@ in aqemu = libsForQt5.callPackage ../applications/virtualization/aqemu { }; - ardour = callPackage ../applications/audio/ardour { - inherit (gnome2) libgnomecanvas libgnomecanvasmm; - }; + ardour = callPackage ../applications/audio/ardour { }; arelle = with python3Packages; toPythonApplication arelle; -- cgit 1.4.1