xdg-desktop-portal: 1.16.0 → 1.17.0
https://github.com/flatpak/xdg-desktop-portal/compare/1.16.0...1.17.0 https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.17.0 Ported to meson. Some of the changes are highlighted in the "Changes that might be relevant for distributors" session in https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.18.0 Notably, desktop environments are now responsible for declaring preferred portal backends: https://github.com/flatpak/xdg-desktop-portal/commit/939f0b0fcec6a42c1acdc397986547e9805359ff Specify sysconfdir so that the configs are loaded from `/etc` rather than `$out/etc`. Changelog-reviewed-by: Bobby Rong <rjl931189261@126.com> Changelog-reviewed-by: Jan Tojnar <jtojnar@gmail.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, acl
|
|
||||||
, autoreconfHook
|
|
||||||
, dbus
|
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, flatpak
|
, flatpak
|
||||||
, fuse3
|
, fuse3
|
||||||
, bubblewrap
|
, bubblewrap
|
||||||
|
, docbook_xml_dtd_412
|
||||||
|
, docbook_xml_dtd_43
|
||||||
|
, docbook_xsl
|
||||||
, systemdMinimal
|
, systemdMinimal
|
||||||
, geoclue2
|
, geoclue2
|
||||||
, glib
|
, glib
|
||||||
@@ -13,6 +13,8 @@
|
|||||||
, json-glib
|
, json-glib
|
||||||
, libportal
|
, libportal
|
||||||
, libxml2
|
, libxml2
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, pipewire
|
, pipewire
|
||||||
, gdk-pixbuf
|
, gdk-pixbuf
|
||||||
@@ -22,12 +24,13 @@
|
|||||||
, stdenv
|
, stdenv
|
||||||
, runCommand
|
, runCommand
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
, xmlto
|
||||||
, enableGeoLocation ? true
|
, enableGeoLocation ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "xdg-desktop-portal";
|
pname = "xdg-desktop-portal";
|
||||||
version = "1.16.0";
|
version = "1.17.0";
|
||||||
|
|
||||||
outputs = [ "out" "installedTests" ];
|
outputs = [ "out" "installedTests" ];
|
||||||
|
|
||||||
@@ -35,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
owner = "flatpak";
|
owner = "flatpak";
|
||||||
repo = "xdg-desktop-portal";
|
repo = "xdg-desktop-portal";
|
||||||
rev = finalAttrs.version;
|
rev = finalAttrs.version;
|
||||||
sha256 = "sha256-5VNauinTvZrSaQzyP/quL/3p2RPcTJUDLscEQMJpvYA=";
|
sha256 = "sha256-OGf2ohP/Qd+ff3KfJYoHu9wbCAUXCP3wm/utjqkgccE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@@ -46,18 +49,24 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
substitute "${flatpak.icon-validator-patch}" "$out" \
|
substitute "${flatpak.icon-validator-patch}" "$out" \
|
||||||
--replace "/icon-validator/validate-icon.c" "/src/validate-icon.c"
|
--replace "/icon-validator/validate-icon.c" "/src/validate-icon.c"
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
# Allow installing installed tests to a separate output.
|
||||||
|
./installed-tests-path.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
docbook_xml_dtd_412
|
||||||
|
docbook_xml_dtd_43
|
||||||
|
docbook_xsl
|
||||||
libxml2
|
libxml2
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
|
xmlto
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
acl
|
|
||||||
dbus
|
|
||||||
flatpak
|
flatpak
|
||||||
fuse3
|
fuse3
|
||||||
bubblewrap
|
bubblewrap
|
||||||
@@ -80,17 +89,28 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
geoclue2
|
geoclue2
|
||||||
];
|
];
|
||||||
|
|
||||||
configureFlags = [
|
nativeCheckInputs = [
|
||||||
"--enable-installed-tests"
|
python3.pkgs.pytest
|
||||||
] ++ lib.optionals (!enableGeoLocation) [
|
python3.pkgs.python-dbusmock
|
||||||
"--disable-geoclue"
|
python3.pkgs.pygobject3
|
||||||
|
python3.pkgs.dbus-python
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
mesonFlags = [
|
||||||
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/xdg-desktop-portal"
|
"--sysconfdir=/etc"
|
||||||
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/xdg-desktop-portal"
|
"-Dinstalled-tests=true"
|
||||||
|
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||||
|
] ++ lib.optionals (!enableGeoLocation) [
|
||||||
|
"-Dgeoclue=false"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
# For test_trash_file
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
|
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index b25f9ef..7975f85 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -40,8 +40,8 @@ if dataroot_dir == ''
|
||||||
|
dataroot_dir = datadir
|
||||||
|
endif
|
||||||
|
|
||||||
|
-installed_tests_dir = prefix / libexecdir / 'installed-tests' / meson.project_name()
|
||||||
|
-installed_tests_data_dir = prefix / datadir / 'installed-tests' / meson.project_name()
|
||||||
|
+installed_tests_dir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / meson.project_name()
|
||||||
|
+installed_tests_data_dir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name()
|
||||||
|
docs_dir = datadir / 'doc' / meson.project_name()
|
||||||
|
|
||||||
|
summary({
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index fccada3..ca87600 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -38,6 +38,10 @@ option('installed-tests',
|
||||||
|
type: 'boolean',
|
||||||
|
value: false,
|
||||||
|
description: 'Enable installation of some test cases')
|
||||||
|
+option('installed_test_prefix',
|
||||||
|
+ type: 'string',
|
||||||
|
+ value: '',
|
||||||
|
+ description: 'Prefix for installed tests')
|
||||||
|
option('pytest',
|
||||||
|
type: 'feature',
|
||||||
|
value: 'auto',
|
||||||
Reference in New Issue
Block a user