summary refs log tree commit diff
path: root/pkgs/development/libraries/drumstick
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2020-11-12 03:38:19 +0000
committerOrivej Desh <orivej@gmx.fr>2020-11-12 03:41:46 +0000
commita1c9c430bf340a7b5170be853cf3261ba7afadb0 (patch)
tree958bb38f24b30040cd1a16d5450f52612fc2fc2a /pkgs/development/libraries/drumstick
parent66c98ec5506c8fbefc4326f9f95035aaecb3a464 (diff)
downloadnixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.tar
nixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.tar.gz
nixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.tar.bz2
nixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.tar.lz
nixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.tar.xz
nixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.tar.zst
nixpkgs-a1c9c430bf340a7b5170be853cf3261ba7afadb0.zip
drumstick: fix plugin lookup and enable SonivoxEAS and FluidSynth plugins
SonivoxEAS is enabled by building with PulseAudio.
Diffstat (limited to 'pkgs/development/libraries/drumstick')
-rw-r--r--pkgs/development/libraries/drumstick/default.nix24
-rw-r--r--pkgs/development/libraries/drumstick/drumstick-fluidsynth.patch9
-rw-r--r--pkgs/development/libraries/drumstick/drumstick-plugins.patch12
3 files changed, 37 insertions, 8 deletions
diff --git a/pkgs/development/libraries/drumstick/default.nix b/pkgs/development/libraries/drumstick/default.nix
index 7cd826b1fe3..5cef17f1119 100644
--- a/pkgs/development/libraries/drumstick/default.nix
+++ b/pkgs/development/libraries/drumstick/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, alsaLib, cmake, docbook_xsl, docbook_xml_dtd_45, doxygen
-, fluidsynth, pkgconfig, qtbase, qtsvg
+{ stdenv, fetchurl
+, cmake, docbook_xml_dtd_45, docbook_xsl, doxygen, pkg-config, wrapQtAppsHook
+, alsaLib, fluidsynth, qtbase, qtsvg, libpulseaudio
 }:
 
 stdenv.mkDerivation rec {
@@ -11,18 +12,25 @@ stdenv.mkDerivation rec {
     sha256 = "1n9wvg79yvkygrkc8xd8pgrd3d7hqmr7gh24dccf0px23lla9b3m";
   };
 
+  patches = [
+    ./drumstick-fluidsynth.patch
+    ./drumstick-plugins.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace library/rt/backendmanager.cpp --subst-var out
+  '';
+
   outputs = [ "out" "dev" "man" ];
 
   enableParallelBuilding = true;
 
-  #Temporarily remove drumstick-piano; Gives segment fault. Submitted ticket
-  postInstall = ''
-    rm $out/bin/drumstick-vpiano
-    '';
+  nativeBuildInputs = [
+    cmake docbook_xml_dtd_45 docbook_xml_dtd_45 docbook_xsl doxygen pkg-config wrapQtAppsHook
+  ];
 
-  nativeBuildInputs = [ cmake pkgconfig docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_45 ];
   buildInputs = [
-    alsaLib doxygen fluidsynth qtbase qtsvg
+    alsaLib fluidsynth libpulseaudio qtbase qtsvg
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/drumstick/drumstick-fluidsynth.patch b/pkgs/development/libraries/drumstick/drumstick-fluidsynth.patch
new file mode 100644
index 00000000000..b8cdf63fb64
--- /dev/null
+++ b/pkgs/development/libraries/drumstick/drumstick-fluidsynth.patch
@@ -0,0 +1,9 @@
+It works with fluidsynth 2.
+
+Backported from r400: https://sourceforge.net/p/drumstick/code/400/
+
+--- a/library/rt-backends/CMakeLists.txt
++++ b/library/rt-backends/CMakeLists.txt
+@@ -54,1 +54,1 @@ if (PKG_CONFIG_FOUND)
+-    pkg_check_modules(FLUIDSYNTH fluidsynth>=1.1.1 fluidsynth<=1.1.11)
++    pkg_check_modules(FLUIDSYNTH fluidsynth>=1.1.1)
diff --git a/pkgs/development/libraries/drumstick/drumstick-plugins.patch b/pkgs/development/libraries/drumstick/drumstick-plugins.patch
new file mode 100644
index 00000000000..cbb0a0e3489
--- /dev/null
+++ b/pkgs/development/libraries/drumstick/drumstick-plugins.patch
@@ -0,0 +1,12 @@
+Make it look for its plugin in its own installation directory.
+
+--- a/library/rt/backendmanager.cpp
++++ b/library/rt/backendmanager.cpp
+@@ -159,6 +159,7 @@ namespace rt {
+         foreach(const QString& path, QCoreApplication::libraryPaths()) {
+             d->appendDir( path + QDir::separator() + QSTR_DRUMSTICK, result );
+         }
++        d->appendDir( "@out@/lib/drumstick", result );
+         return result;
+     }
+