2021-10-07 16:12:54 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-02-07 22:03:28 +00:00
|
|
|
, fetchFromGitHub
|
2021-11-12 14:34:48 +00:00
|
|
|
, fetchpatch
|
2020-02-07 22:03:28 +00:00
|
|
|
, nixosTests
|
|
|
|
, substituteAll
|
|
|
|
, autoreconfHook
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-02-07 22:03:28 +00:00
|
|
|
, libxml2
|
|
|
|
, glib
|
2020-05-22 11:38:32 +01:00
|
|
|
, pipewire
|
2020-02-07 22:03:28 +00:00
|
|
|
, flatpak
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, acl
|
|
|
|
, dbus
|
|
|
|
, fuse
|
2020-02-08 05:57:47 +00:00
|
|
|
, libportal
|
2020-02-07 22:03:28 +00:00
|
|
|
, geoclue2
|
|
|
|
, json-glib
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2017-10-03 00:19:20 +01:00
|
|
|
|
2018-12-24 11:33:39 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xdg-desktop-portal";
|
2021-10-07 16:12:54 +01:00
|
|
|
version = "1.10.1";
|
2017-10-03 00:19:20 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "installedTests" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flatpak";
|
2018-12-24 11:33:39 +00:00
|
|
|
repo = pname;
|
2017-10-03 00:19:20 +01:00
|
|
|
rev = version;
|
2021-10-07 16:12:54 +01:00
|
|
|
sha256 = "Q1ZP/ljdIxJHg+3JaTL/LIZV+3cK2+dognsTC95udVA=";
|
2017-10-03 00:19:20 +01:00
|
|
|
};
|
|
|
|
|
2018-02-13 01:09:51 +00:00
|
|
|
patches = [
|
2020-02-07 22:03:28 +00:00
|
|
|
# Hardcode paths used by x-d-p itself.
|
2019-02-21 21:23:04 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit flatpak;
|
|
|
|
})
|
2021-11-12 14:34:48 +00:00
|
|
|
# Fixes the issue in https://github.com/flatpak/xdg-desktop-portal/issues/636
|
|
|
|
# Remove it when the next stable release arrives
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/flatpak/xdg-desktop-portal/commit/d7622e15ff8fef114a6759dde564826d04215a9f.patch";
|
|
|
|
sha256 = "sha256-vmfxK4ddG6Xon//rpiz6OiBsDLtT0VG5XyBJG3E4PPs=";
|
|
|
|
})
|
2018-02-13 01:09:51 +00:00
|
|
|
];
|
|
|
|
|
2020-02-07 22:03:28 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-02-07 22:03:28 +00:00
|
|
|
libxml2
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
2020-05-22 11:38:32 +01:00
|
|
|
pipewire
|
2020-02-07 22:03:28 +00:00
|
|
|
flatpak
|
|
|
|
acl
|
|
|
|
dbus
|
|
|
|
geoclue2
|
|
|
|
fuse
|
2020-02-08 05:57:47 +00:00
|
|
|
libportal
|
2020-02-07 22:03:28 +00:00
|
|
|
gsettings-desktop-schemas
|
|
|
|
json-glib
|
|
|
|
];
|
2017-10-03 00:19:20 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-installed-tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
2020-02-07 22:03:28 +00:00
|
|
|
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/xdg-desktop-portal"
|
|
|
|
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/xdg-desktop-portal"
|
2017-10-03 00:19:20 +01:00
|
|
|
];
|
|
|
|
|
2019-11-07 13:38:54 +00:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2017-10-03 00:19:20 +01:00
|
|
|
description = "Desktop integration portals for sandboxed apps";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|