1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 pkg-config,
6 qmake,
7 qttools,
8 wrapQtAppsHook,
9 alsa-lib,
10 flac,
11 libjack2,
12 libogg,
13 libvorbis,
14 qtsvg,
15 qtwayland,
16 rtmidi,
17}:
18
19stdenv.mkDerivation rec {
20 version = "2.4.1";
21 pname = "polyphone";
22
23 src = fetchFromGitHub {
24 owner = "davy7125";
25 repo = "polyphone";
26 rev = version;
27 hash = "sha256-43EswCgNJv11Ov+4vmj2vS/yJ2atyzkRmk/SoCKYD/0=";
28 };
29
30 nativeBuildInputs = [
31 pkg-config
32 qmake
33 qttools
34 wrapQtAppsHook
35 ];
36
37 buildInputs = [
38 alsa-lib
39 flac
40 libjack2
41 libogg
42 libvorbis
43 qtsvg
44 qtwayland
45 rtmidi
46 ];
47
48 preConfigure = ''
49 cd ./sources/
50 '';
51
52 postConfigure = ''
53 # Work around https://github.com/NixOS/nixpkgs/issues/214765
54 substituteInPlace Makefile \
55 --replace-fail "$(dirname $QMAKE)/lrelease" "${lib.getBin qttools}/bin/lrelease"
56 '';
57
58 qmakeFlags = [
59 "DEFINES+=USE_LOCAL_STK"
60 ];
61
62 meta = with lib; {
63 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
64 description = "Soundfont editor for creating musical instruments";
65 mainProgram = "polyphone";
66 homepage = "https://www.polyphone-soundfonts.com/";
67 license = licenses.gpl3;
68 maintainers = with maintainers; [
69 maxdamantus
70 orivej
71 ];
72 platforms = platforms.linux;
73 };
74}