about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/malcontent/ui.nix
blob: 59950a75c745bd4b006cb26e38f67d676fc6d805 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{ lib, stdenv
, meson
, ninja
, pkg-config
, gobject-introspection
, itstool
, wrapGAppsHook4
, glib
, accountsservice
, dbus
, flatpak
, malcontent
, gtk4
, libadwaita
, appstream
, desktop-file-utils
, polkit
, glib-testing
}:

stdenv.mkDerivation rec {
  pname = "malcontent-ui";

  inherit (malcontent) version src;

  outputs = [ "out" "lib" "dev" ];

  patches = [
    # Allow installing installed tests to a separate output.
    ./installed-tests-path.patch

    # Do not build things that are part of malcontent package
    ./better-separation.patch
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gobject-introspection
    itstool
    desktop-file-utils
    wrapGAppsHook4
  ];

  buildInputs = [
    appstream
    dbus
    polkit
    glib-testing
    flatpak
  ];

  propagatedBuildInputs = [
    accountsservice
    malcontent
    glib
    gtk4
    libadwaita
  ];

  mesonFlags = [
    "-Dinstalled_tests=true"
    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
    "-Duse_system_libmalcontent=true"
    "-Dui=enabled"
  ];

  meta = with lib; {
    description = "UI components for parental controls library";
    homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
    license = licenses.lgpl21Plus;
    maintainers = with maintainers; [ jtojnar ];
    platforms = platforms.unix;
  };
}