tmuxPlugins.catppucin: unstable-2024-05-16 -> 2.1.2 (#379030)
[NixPkgs.git] / pkgs / by-name / at / at-spi2-core / package.nix
blob97486d5bd03f40894fd5566af23442c4750db8d9
2   lib,
3   stdenv,
4   fetchurl,
5   meson,
6   ninja,
7   pkg-config,
8   gobject-introspection,
9   buildPackages,
10   withIntrospection ?
11     lib.meta.availableOn stdenv.hostPlatform gobject-introspection
12     && stdenv.hostPlatform.emulatorAvailable buildPackages,
13   gsettings-desktop-schemas,
14   makeWrapper,
15   dbus,
16   glib,
17   dconf,
18   libX11,
19   libxml2,
20   libXtst,
21   libXi,
22   libXext,
23   gnome,
24   systemd,
25   systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
28 stdenv.mkDerivation rec {
29   pname = "at-spi2-core";
30   version = "2.54.0";
32   outputs = [
33     "out"
34     "dev"
35   ];
36   separateDebugInfo = true;
38   src = fetchurl {
39     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
40     hash = "sha256-1+7n51vt3MJyztwrYFNWAPOq5uSBWJ68Znr8Q3wKYHk=";
41   };
43   nativeBuildInputs =
44     [
45       glib
46       meson
47       ninja
48       pkg-config
49       makeWrapper
50     ]
51     ++ lib.optionals withIntrospection [
52       gobject-introspection
53     ];
55   buildInputs =
56     [
57       libX11
58       libxml2
59       # at-spi2-core can be build without X support, but due it is a client-side library, GUI-less usage is a very rare case
60       libXtst
61       libXi
62       # libXext is a transitive dependency of libXi
63       libXext
64     ]
65     ++ lib.optionals systemdSupport [
66       # libsystemd is a needed for dbus-broker support
67       systemd
68     ];
70   # In atspi-2.pc dbus-1 glib-2.0
71   # In atk.pc gobject-2.0
72   propagatedBuildInputs = [
73     dbus
74     glib
75   ];
77   # fails with "AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?"
78   doCheck = false;
80   mesonFlags =
81     [
82       # Provide dbus-daemon fallback when it is not already running when
83       # at-spi2-bus-launcher is executed. This allows us to avoid
84       # including the entire dbus closure in libraries linked with
85       # the at-spi2-core libraries.
86       "-Ddbus_daemon=/run/current-system/sw/bin/dbus-daemon"
87     ]
88     ++ lib.optionals systemdSupport [
89       # Same as the above, but for dbus-broker
90       "-Ddbus_broker=/run/current-system/sw/bin/dbus-broker-launch"
91     ]
92     ++ lib.optionals (!systemdSupport) [
93       "-Duse_systemd=false"
94     ];
96   passthru = {
97     updateScript = gnome.updateScript {
98       packageName = pname;
99       versionPolicy = "odd-unstable";
100     };
101   };
103   postFixup = ''
104     # Cannot use wrapGAppsHook'due to a dependency cycle
105     wrapProgram $out/libexec/at-spi-bus-launcher \
106       --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
107       --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
108   '';
110   meta = with lib; {
111     description = "Assistive Technology Service Provider Interface protocol definitions and daemon for D-Bus";
112     homepage = "https://gitlab.gnome.org/GNOME/at-spi2-core";
113     license = licenses.lgpl21Plus;
114     maintainers = teams.gnome.members ++ (with maintainers; [ raskin ]);
115     platforms = platforms.unix;
116   };