depot/third_party/nixpkgs/pkgs/applications/audio/pianobooster/default.nix
Default email eeb71630af Project import generated by Copybara.
GitOrigin-RevId: 636051e353461f073ac55d5d42c1ed062a345046
2022-11-02 23:02:43 +01:00

71 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 = "A MIDI file player that teaches you how to play the piano";
homepage = "https://github.com/pianobooster/PianoBooster";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ goibhniu orivej ];
};
}