1{ stdenv
2, lib
3, fetchurl
4, gtk3
5, meson
6, mesonEmulatorHook
7, ninja
8, pkg-config
9, gobject-introspection
10, gtk-doc
11, docbook-xsl-nons
12, gnome
13, dbus
14, xvfb-run
15}:
16
17stdenv.mkDerivation rec {
18 pname = "amtk";
19 version = "5.6.1";
20
21 outputs = [ "out" "dev" "devdoc" ];
22
23 src = fetchurl {
24 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
25 sha256 = "1QEVuFyHKqwpaTS17nJqP6FWxvWtltJ+Dt0Kpa0XMig=";
26 };
27
28 strictDeps = true;
29 nativeBuildInputs = [
30 meson
31 ninja
32 pkg-config
33 dbus
34 gobject-introspection
35 gtk-doc
36 docbook-xsl-nons
37 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
38 mesonEmulatorHook
39 ];
40
41 buildInputs = [
42 gtk3
43 ];
44
45 doCheck = stdenv.isLinux;
46 checkPhase = ''
47 export NO_AT_BRIDGE=1
48 ${xvfb-run}/bin/xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
49 --config-file=${dbus}/share/dbus-1/session.conf \
50 meson test --print-errorlogs
51 '';
52
53 passthru.updateScript = gnome.updateScript {
54 packageName = pname;
55 versionPolicy = "none";
56 };
57
58 meta = with lib; {
59 homepage = "https://wiki.gnome.org/Projects/Amtk";
60 description = "Actions, Menus and Toolbars Kit for GTK applications";
61 maintainers = [ maintainers.manveru ];
62 license = licenses.lgpl21Plus;
63 platforms = platforms.linux;
64 };
65}