diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/drumstick')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/drumstick/default.nix | 44 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch | 14 |
2 files changed, 58 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/drumstick/default.nix b/nixpkgs/pkgs/development/libraries/drumstick/default.nix new file mode 100644 index 000000000000..7cbeffd5b7ec --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/drumstick/default.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, fetchurl +, cmake, docbook_xml_dtd_45, docbook_xsl, doxygen, graphviz-nox, pkg-config, qttools, wrapQtAppsHook +, alsa-lib, fluidsynth, qtbase, qtsvg, libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "drumstick"; + version = "2.4.1"; + + src = fetchurl { + url = "mirror://sourceforge/drumstick/${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-nmqgS08ZBQ2vBEDtoriNbYLaNQA1DWeDhbRo70rBOP0="; + }; + + patches = [ + ./drumstick-plugins.patch + ]; + + postPatch = '' + substituteInPlace library/rt/backendmanager.cpp --subst-var out + ''; + + outputs = [ "out" "dev" "man" ]; + + nativeBuildInputs = [ + cmake docbook_xml_dtd_45 docbook_xml_dtd_45 docbook_xsl doxygen graphviz-nox pkg-config qttools wrapQtAppsHook + ]; + + buildInputs = [ + alsa-lib fluidsynth libpulseaudio qtbase qtsvg + ]; + + cmakeFlags = [ + "-DUSE_DBUS=ON" + ]; + + meta = with lib; { + maintainers = []; + description = "MIDI libraries for Qt5/C++"; + homepage = "http://drumstick.sourceforge.net/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch b/nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch new file mode 100644 index 000000000000..59711120a8e8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch @@ -0,0 +1,14 @@ +Make it look for its plugin in its own installation directory. + +Without this vmpk fails to start with "Unable to initialize all MIDI drivers". + +--- 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/" + QSTR_DRUMSTICK, result ); + return result; + } + |