1{ lib
2, stdenv
3, fetchurl
4, ninja
5, meson
6, mesonEmulatorHook
7, pkg-config
8, vala
9, gobject-introspection
10, libxml2
11, gtk-doc
12, docbook_xsl
13, docbook_xml_dtd_43
14, dbus
15, xvfb-run
16, glib
17, gtk3
18, gnome
19}:
20
21stdenv.mkDerivation rec {
22 pname = "libdazzle";
23 version = "3.44.0";
24
25 outputs = [ "out" "dev" "devdoc" ];
26 outputBin = "dev";
27
28 src = fetchurl {
29 url = "mirror://gnome/sources/libdazzle/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
30 sha256 = "PNPkXrbiaAywXVLh6A3Y+dWdR2UhLw4o945sF4PRjq4=";
31 };
32
33 nativeBuildInputs = [
34 ninja
35 meson
36 pkg-config
37 vala
38 gobject-introspection
39 libxml2
40 gtk-doc
41 docbook_xsl
42 docbook_xml_dtd_43
43 dbus
44 glib
45 ] ++ lib.optionals stdenv.isLinux [
46 xvfb-run
47 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
48 mesonEmulatorHook
49 ];
50
51 buildInputs = [
52 glib
53 gtk3
54 ];
55
56 mesonFlags = [
57 "-Denable_gtk_doc=true"
58 ];
59
60 doCheck = stdenv.isLinux;
61
62 checkPhase = ''
63 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
64 --config-file=${dbus}/share/dbus-1/session.conf \
65 meson test --print-errorlogs
66 '';
67
68 passthru = {
69 updateScript = gnome.updateScript {
70 packageName = pname;
71 };
72 };
73
74 meta = with lib; {
75 description = "A library to delight your users with fancy features";
76 longDescription = ''
77 The libdazzle library is a companion library to GObject and GTK. It
78 provides various features that we wish were in the underlying library but
79 cannot for various reasons. In most cases, they are wildly out of scope
80 for those libraries. In other cases, our design isn't quite generic
81 enough to work for everyone.
82 '';
83 homepage = "https://wiki.gnome.org/Apps/Builder";
84 license = licenses.gpl3Plus;
85 maintainers = teams.gnome.members;
86 platforms = platforms.unix;
87 };
88}