2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
|
|
|
, acl
|
|
|
|
, autoreconfHook
|
|
|
|
, dbus
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, flatpak
|
2022-04-27 09:35:20 +00:00
|
|
|
, fuse3
|
|
|
|
, systemdMinimal
|
2020-04-24 23:36:52 +00:00
|
|
|
, geoclue2
|
2022-03-05 16:20:37 +00:00
|
|
|
, glib
|
|
|
|
, gsettings-desktop-schemas
|
2020-04-24 23:36:52 +00:00
|
|
|
, json-glib
|
2022-03-05 16:20:37 +00:00
|
|
|
, libportal
|
|
|
|
, libxml2
|
|
|
|
, nixosTests
|
|
|
|
, pipewire
|
2022-04-27 09:35:20 +00:00
|
|
|
, gdk-pixbuf
|
|
|
|
, librsvg
|
|
|
|
, python3
|
2022-03-05 16:20:37 +00:00
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, wrapGAppsHook
|
2022-03-05 16:20:37 +00:00
|
|
|
, enableGeoLocation ? true
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xdg-desktop-portal";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.15.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "installedTests" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flatpak";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-Kw3zJeGwPfw1fDo8HsgYmrpgCk/PUvWZPRloKJNAJVc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
libxml2
|
2022-03-05 16:20:37 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
acl
|
|
|
|
dbus
|
2022-03-05 16:20:37 +00:00
|
|
|
flatpak
|
2022-04-27 09:35:20 +00:00
|
|
|
fuse3
|
|
|
|
systemdMinimal # libsystemd
|
2022-03-05 16:20:37 +00:00
|
|
|
glib
|
2020-04-24 23:36:52 +00:00
|
|
|
gsettings-desktop-schemas
|
|
|
|
json-glib
|
2022-03-05 16:20:37 +00:00
|
|
|
libportal
|
|
|
|
pipewire
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
# For icon validator
|
|
|
|
gdk-pixbuf
|
|
|
|
librsvg
|
|
|
|
|
|
|
|
# For document-fuse installed test.
|
|
|
|
(python3.withPackages (pp: with pp; [
|
|
|
|
pygobject3
|
|
|
|
]))
|
2022-03-05 16:20:37 +00:00
|
|
|
] ++ lib.optionals enableGeoLocation [
|
|
|
|
geoclue2
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-installed-tests"
|
2022-03-05 16:20:37 +00:00
|
|
|
] ++ lib.optionals (!enableGeoLocation) [
|
|
|
|
"--disable-geoclue"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/xdg-desktop-portal"
|
|
|
|
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/xdg-desktop-portal"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|