about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/li/libgedit-amtk/package.nix
blob: 4de7207660c9126f196c39360ddb323f7cb52f14 (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
{ stdenv
, lib
, fetchFromGitHub
, glib
, gtk3
, meson
, mesonEmulatorHook
, ninja
, pkg-config
, gobject-introspection
, gtk-doc
, docbook-xsl-nons
, gitUpdater
, dbus
, xvfb-run
}:

stdenv.mkDerivation rec {
  pname = "libgedit-amtk";
  version = "5.8.0";

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

  src = fetchFromGitHub {
    owner = "gedit-technology";
    repo = "libgedit-amtk";
    rev = version;
    hash = "sha256-U77/KMZw9k9ukebCXVXAsCa4uJaTgw9irfZ/l0303kk=";
  };

  strictDeps = true;
  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gobject-introspection
    gtk-doc
    docbook-xsl-nons
  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
    mesonEmulatorHook
  ];

  propagatedBuildInputs = [
    # Required by libgedit-amtk-5.pc
    glib
    gtk3
  ];

  nativeCheckInputs = [
    dbus # For dbus-run-session
  ];

  doCheck = stdenv.isLinux;
  checkPhase = ''
    runHook preCheck

    export NO_AT_BRIDGE=1
    ${xvfb-run}/bin/xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
      --config-file=${dbus}/share/dbus-1/session.conf \
      meson test --print-errorlogs

    runHook postCheck
  '';

  passthru.updateScript = gitUpdater {
    odd-unstable = true;
  };

  meta = with lib; {
    homepage = "https://github.com/gedit-technology/libgedit-amtk";
    description = "Actions, Menus and Toolbars Kit for GTK applications";
    maintainers = with maintainers; [ manveru bobby285271 ];
    license = licenses.lgpl21Plus;
    platforms = platforms.linux;
  };
}