about summary refs log tree commit diff
path: root/pkgs/applications/audio/guitarix
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2020-05-22 08:06:06 +0000
committerOrivej Desh <orivej@gmx.fr>2020-05-22 08:13:21 +0000
commit5de1e307f29ab91baeb43ab2a58ed13a944e40ea (patch)
tree032a90b1ae8a6bdaf341dc089fcf056cd2b82fb3 /pkgs/applications/audio/guitarix
parente9759c1c3aba20a0f56b1b861d25232888ce4b8e (diff)
downloadnixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.tar
nixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.tar.gz
nixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.tar.bz2
nixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.tar.lz
nixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.tar.xz
nixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.tar.zst
nixlib-5de1e307f29ab91baeb43ab2a58ed13a944e40ea.zip
guitarix: fix build with lv2 1.18, enable faust plugins
Diffstat (limited to 'pkgs/applications/audio/guitarix')
-rw-r--r--pkgs/applications/audio/guitarix/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/applications/audio/guitarix/default.nix b/pkgs/applications/audio/guitarix/default.nix
index 095cd79b56e4..f94d27565e91 100644
--- a/pkgs/applications/audio/guitarix/default.nix
+++ b/pkgs/applications/audio/guitarix/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gettext, intltool, pkgconfig, python2
+{ stdenv, fetchurl, fetchpatch, faust, gettext, intltool, pkgconfig, python2
 , avahi, bluez, boost, eigen, fftw, glib, glib-networking
 , glibmm, gsettings-desktop-schemas, gtkmm2, libjack2
 , ladspaH, libav, libsndfile, lilv, lrdf, lv2, serd, sord, sratom
@@ -19,7 +19,15 @@ stdenv.mkDerivation rec {
     sha256 = "1nn80m1qagfhvv69za60f0w6ck87vmk77qmqarj7fbr8avwg63s9";
   };
 
-  nativeBuildInputs = [ gettext intltool wrapGAppsHook pkgconfig python2 wafHook ];
+  patches = [
+    (fetchpatch {
+      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/guitarix-0.39.0-fix_faust_and_lv2_plugins.patch?id=8579b4dfe85e04303ad2d9771ed699f04ea7b7cf";
+      stripLen = 1;
+      sha256 = "0pgkhi4v4vrzjnig0ggmz207q4x5iyk2n6rjj8s5lv15fia7qzp4";
+    })
+  ];
+
+  nativeBuildInputs = [ faust gettext intltool wrapGAppsHook pkgconfig python2 wafHook ];
 
   buildInputs = [
     avahi bluez boost eigen fftw glib glibmm glib-networking.out
@@ -28,11 +36,16 @@ stdenv.mkDerivation rec {
     zita-resampler curl
   ];
 
+  postPatch = ''
+    # Fix build with lv2 1.18: https://github.com/brummer10/guitarix/commit/c0334c72
+    find . -type f -exec fgrep -q LV2UI_Descriptor {} \; \
+      -exec sed -i {} -e 's/const struct _\?LV2UI_Descriptor/const LV2UI_Descriptor/' \;
+  '';
+
   wafConfigureFlags = [
     "--shared-lib"
     "--no-desktop-update"
     "--enable-nls"
-    "--no-faust" # todo: find out why --faust doesn't work
     "--install-roboto-font"
     "--includeresampler"
     "--convolver-ffmpeg"