1{
2 stdenv,
3 lib,
4 fetchFromGitLab,
5
6 # build time
7 pkg-config,
8 meson,
9 ninja,
10 sphinxygen,
11 doxygen,
12 sphinx,
13 python3Packages,
14
15 # runtime
16 lv2,
17
18 # options
19 withGtk2 ? false,
20 gtk2,
21 withGtk3 ? true,
22 gtk3,
23 withQt5 ? true,
24 qt5,
25 withX11 ? !stdenv.hostPlatform.isDarwin,
26}:
27
28let
29 inherit (lib) mesonEnable;
30in
31
32stdenv.mkDerivation rec {
33 pname = "suil";
34 version = "0.10.20";
35
36 src = fetchFromGitLab {
37 owner = "lv2";
38 repo = "suil";
39 rev = "v${version}";
40 hash = "sha256-rP8tq+zmHrAZeuNttakPPfraFXNvnwqbhtt+LtTNV/k=";
41 };
42
43 nativeBuildInputs = [
44 meson
45 ninja
46 pkg-config
47 sphinxygen
48 doxygen
49 sphinx
50 python3Packages.sphinx-lv2-theme
51 ];
52
53 mesonFlags = [
54 (mesonEnable "gtk2" withGtk2)
55 (mesonEnable "gtk3" withGtk3)
56 (mesonEnable "qt5" withQt5)
57 (mesonEnable "x11" withX11)
58 ];
59
60 buildInputs = [
61 lv2
62 ]
63 ++ lib.optionals withGtk2 [ gtk2 ]
64 ++ lib.optionals withGtk3 [ gtk3 ]
65 ++ lib.optionals withQt5 (
66 with qt5;
67 [
68 qtbase
69 qttools
70 ]
71 ++ lib.optionals withX11 [ qtx11extras ]
72 );
73
74 dontWrapQtApps = true;
75
76 strictDeps = true;
77
78 meta = with lib; {
79 homepage = "http://drobilla.net/software/suil";
80 description = "Lightweight C library for loading and wrapping LV2 plugin UIs";
81 license = licenses.mit;
82 maintainers = [ ];
83 platforms = platforms.unix;
84 };
85}