1{
2 lib,
3 stdenv,
4 meson,
5 ninja,
6 pkg-config,
7 gobject-introspection,
8 itstool,
9 wrapGAppsHook4,
10 glib,
11 accountsservice,
12 dbus,
13 flatpak,
14 malcontent,
15 gtk4,
16 libadwaita,
17 appstream,
18 desktop-file-utils,
19 polkit,
20 glib-testing,
21}:
22
23stdenv.mkDerivation {
24 pname = "malcontent-ui";
25
26 inherit (malcontent) version src;
27
28 outputs = [
29 "out"
30 "lib"
31 "dev"
32 ];
33
34 patches = [
35 # Allow installing installed tests to a separate output.
36 ./installed-tests-path.patch
37
38 # Do not build things that are part of malcontent package
39 ./better-separation.patch
40 ];
41
42 nativeBuildInputs = [
43 meson
44 ninja
45 pkg-config
46 gobject-introspection
47 itstool
48 desktop-file-utils
49 wrapGAppsHook4
50 ];
51
52 buildInputs = [
53 appstream
54 dbus
55 polkit
56 glib-testing
57 flatpak
58 ];
59
60 propagatedBuildInputs = [
61 accountsservice
62 malcontent
63 glib
64 gtk4
65 libadwaita
66 ];
67
68 mesonFlags = [
69 "-Dinstalled_tests=true"
70 "-Dinstalled_test_prefix=${placeholder "installedTests"}"
71 "-Duse_system_libmalcontent=true"
72 "-Dui=enabled"
73 ];
74
75 meta = with lib; {
76 description = "UI components for parental controls library";
77 mainProgram = "malcontent-control";
78 homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
79 license = licenses.lgpl21Plus;
80 maintainers = with maintainers; [ jtojnar ];
81 platforms = platforms.unix;
82 };
83}