2021-10-14 00:43:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2020-10-11 12:50:04 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
|
|
|
, xdg-desktop-portal
|
|
|
|
, gtk3
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2022-03-30 09:31:56 +00:00
|
|
|
, gnome-desktop
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gsettings-desktop-schemas
|
2021-10-14 00:43:12 +00:00
|
|
|
, buildPortalsInGnome ? true
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xdg-desktop-portal-gtk";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.14.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flatpak";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "I9xQgiE3lNb2vRodO5R1y40lqoOKzALskrVePidant4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
libxml2
|
2020-10-11 12:50:04 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapGAppsHook
|
|
|
|
xdg-desktop-portal
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
2021-05-20 23:08:51 +00:00
|
|
|
gsettings-desktop-schemas # settings exposed by settings portal
|
2020-04-24 23:36:52 +00:00
|
|
|
gtk3
|
2022-03-30 09:31:56 +00:00
|
|
|
gnome-desktop
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s)
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
configureFlags = if buildPortalsInGnome then [
|
2021-10-14 00:43:12 +00:00
|
|
|
"--enable-wallpaper"
|
|
|
|
"--enable-screenshot"
|
|
|
|
"--enable-screencast"
|
|
|
|
"--enable-background"
|
|
|
|
"--enable-settings"
|
|
|
|
"--enable-appchooser"
|
2022-03-05 16:20:37 +00:00
|
|
|
] else [
|
|
|
|
# These are now enabled by default, even though we do not need them for GNOME.
|
|
|
|
# https://github.com/flatpak/xdg-desktop-portal-gtk/issues/355
|
|
|
|
"--disable-settings"
|
|
|
|
"--disable-appchooser"
|
2021-10-14 00:43:12 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Desktop integration portals for sandboxed apps";
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.linux;
|
2020-10-11 12:50:04 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|