lol
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 meson,
6 ninja,
7 pkg-config,
8 gobject-introspection,
9 vala,
10 gtk-doc,
11 docbook_xsl,
12 docbook_xml_dtd_43,
13 gtk3,
14 gnome-desktop,
15 dbus,
16 xvfb-run,
17 libxml2,
18 hicolor-icon-theme,
19}:
20
21stdenv.mkDerivation rec {
22 pname = "libhandy";
23 version = "0.0.13";
24
25 outputs = [
26 "out"
27 "dev"
28 "devdoc"
29 ];
30 outputBin = "dev";
31
32 src = fetchFromGitLab {
33 domain = "source.puri.sm";
34 owner = "Librem5";
35 repo = pname;
36 rev = "v${version}";
37 sha256 = "1y23k623sjkldfrdiwfarpchg5mg58smcy1pkgnwfwca15wm1ra5";
38 };
39
40 nativeBuildInputs = [
41 meson
42 ninja
43 pkg-config
44 gobject-introspection
45 vala
46 libxml2
47 gtk-doc
48 docbook_xsl
49 docbook_xml_dtd_43
50 ];
51 buildInputs = [
52 gnome-desktop
53 gtk3
54 libxml2
55 ];
56 nativeCheckInputs = [
57 dbus
58 xvfb-run
59 hicolor-icon-theme
60 ];
61
62 mesonFlags = [
63 "-Dgtk_doc=true"
64 "-Dglade_catalog=disabled"
65 "-Dintrospection=enabled"
66 ];
67
68 doCheck = !stdenv.hostPlatform.isDarwin;
69
70 checkPhase = ''
71 NO_AT_BRIDGE=1 \
72 XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share" \
73 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
74 --config-file=${dbus}/share/dbus-1/session.conf \
75 meson test --print-errorlogs
76 '';
77
78 meta = with lib; {
79 description = "Library full of GTK widgets for mobile phones";
80 mainProgram = "handy-0.0-demo";
81 homepage = "https://source.puri.sm/Librem5/libhandy";
82 license = licenses.lgpl21Plus;
83 maintainers = [ ];
84 platforms = platforms.unix;
85 };
86}