btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / libgedit-amtk / package.nix
blob00891ba921a59dddc60beaef2c870e61612a68b9
1 { stdenv
2 , lib
3 , fetchFromGitLab
4 , glib
5 , gtk3
6 , meson
7 , mesonEmulatorHook
8 , ninja
9 , pkg-config
10 , gobject-introspection
11 , gtk-doc
12 , docbook-xsl-nons
13 , gitUpdater
14 , dbus
15 , xvfb-run
18 stdenv.mkDerivation rec {
19   pname = "libgedit-amtk";
20   version = "5.9.0";
22   outputs = [ "out" "dev" "devdoc" ];
24   src = fetchFromGitLab {
25     domain = "gitlab.gnome.org";
26     group = "World";
27     owner = "gedit";
28     repo = "libgedit-amtk";
29     rev = version;
30     hash = "sha256-D6jZmadUHDtxedw/tCsKHzcWXobs6Vb7dyhbVKqu2Zc=";
31   };
33   strictDeps = true;
34   nativeBuildInputs = [
35     meson
36     ninja
37     pkg-config
38     gobject-introspection
39     gtk-doc
40     docbook-xsl-nons
41   ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
42     mesonEmulatorHook
43   ];
45   propagatedBuildInputs = [
46     # Required by libgedit-amtk-5.pc
47     glib
48     gtk3
49   ];
51   nativeCheckInputs = [
52     dbus # For dbus-run-session
53   ];
55   doCheck = stdenv.hostPlatform.isLinux;
56   checkPhase = ''
57     runHook preCheck
59     export NO_AT_BRIDGE=1
60     ${xvfb-run}/bin/xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
61       --config-file=${dbus}/share/dbus-1/session.conf \
62       meson test --print-errorlogs
64     runHook postCheck
65   '';
67   passthru.updateScript = gitUpdater { };
69   meta = with lib; {
70     homepage = "https://gitlab.gnome.org/World/gedit/libgedit-amtk";
71     changelog = "https://gitlab.gnome.org/World/gedit/libgedit-amtk/-/blob/${version}/NEWS?ref_type=tags";
72     description = "Actions, Menus and Toolbars Kit for GTK applications";
73     maintainers = with maintainers; [ manveru bobby285271 ];
74     license = licenses.lgpl21Plus;
75     platforms = platforms.linux;
76   };