7 , gobject-introspection
11 , gsettings-desktop-schemas
27 stdenv.mkDerivation rec {
35 ] ++ lib.optionals enableGlade [
41 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
42 sha256 = "sha256-0RqizT5XCsbQ79ukbRcxR8EfRYJkV+kkwFmQuy4N+a0=";
56 ] ++ lib.optionals enableGlade [
63 ] ++ lib.optionals enableGlade [
77 "-Dglade_catalog=${if enableGlade then "enabled" else "disabled"}"
80 # Uses define_variable in pkg-config, but we still need it to use the glade output
81 PKG_CONFIG_GLADEUI_2_0_MODULEDIR = "${placeholder "glade"}/lib/glade/modules";
82 PKG_CONFIG_GLADEUI_2_0_CATALOGDIR = "${placeholder "glade"}/share/glade/catalogs";
84 doCheck = !stdenv.isDarwin;
90 # Disable portal since we cannot run it in tests.
93 "XDG_DATA_DIRS=${lib.concatStringsSep ":" [
94 # HdySettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
95 # It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
96 # See hdy_settings_constructed function in https://gitlab.gnome.org/GNOME/libhandy/-/commit/bb68249b005c445947bfb2bee66c91d0fe9c41a4
97 (glib.getSchemaDataDirPath gsettings-desktop-schemas)
99 # Some tests require icons
100 "${hicolor-icon-theme}/share"
103 env "''${testEnvironment[@]}" xvfb-run \
104 meson test --print-errorlogs
110 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
111 moveToOutput "share/doc" "$devdoc"
115 updateScript = gnome.updateScript {
117 versionPolicy = "odd-unstable";
119 } // lib.optionalAttrs (!enableGlade) {
122 libhandyWithGlade = libhandy.override {
125 in runCommand "${libhandy.name}-glade" {} ''
126 cp -r "${libhandyWithGlade.glade}" "$out"
128 sed -e "s#${libhandyWithGlade.out}#${libhandy.out}#g" -e "s#${libhandyWithGlade.glade}#$out#g" -i $(find "$out" -type f)
133 changelog = "https://gitlab.gnome.org/GNOME/libhandy/-/tags/${version}";
134 description = "Building blocks for modern adaptive GNOME apps";
135 homepage = "https://gitlab.gnome.org/GNOME/libhandy";
136 license = licenses.lgpl21Plus;
137 maintainers = teams.gnome.members;
138 platforms = platforms.unix;