Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
72 lines
1.3 KiB
Nix
72 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, qttools
|
|
, alsa-lib
|
|
, ftgl
|
|
, libGLU
|
|
, qtbase
|
|
, rtmidi
|
|
, libjack2
|
|
, fluidsynth
|
|
, soundfont-fluid
|
|
, unzip
|
|
, wrapQtAppsHook
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pianobooster";
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pianobooster";
|
|
repo = "PianoBooster";
|
|
rev = "v${version}";
|
|
hash = "sha256-1WOlAm/HXSL6QK0Kd1mnFEZxxpMseTG+6WzgMNWt+RA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/Settings.cpp src/GuiMidiSetupDialog.cpp \
|
|
--replace "/usr/share/soundfonts" "${soundfont-fluid}/share/soundfonts" \
|
|
--replace "FluidR3_GM.sf2" "FluidR3_GM2-2.sf2"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
qttools
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
alsa-lib
|
|
ftgl
|
|
libGLU
|
|
qtbase
|
|
rtmidi
|
|
libjack2
|
|
fluidsynth
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DOpenGL_GL_PREFERENCE=GLVND"
|
|
"-DUSE_JACK=ON"
|
|
];
|
|
|
|
postInstall = ''
|
|
qtWrapperArgs+=(
|
|
--prefix PATH : "${lib.makeBinPath [ unzip ]}"
|
|
)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "MIDI file player that teaches you how to play the piano";
|
|
mainProgram = "pianobooster";
|
|
homepage = "https://github.com/pianobooster/PianoBooster";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ orivej ];
|
|
};
|
|
}
|