nixpkgs/pkgs/development/libraries/xdg-desktop-portal/default.nix

90 lines
1.6 KiB
Nix
Raw Normal View History

2020-02-08 01:03:28 +03:00
{ stdenv
, fetchFromGitHub
, nixosTests
, substituteAll
, autoreconfHook
, pkgconfig
, libxml2
, glib
, pipewire
, fontconfig
, flatpak
, gsettings-desktop-schemas
, acl
, dbus
, fuse
, libportal
2020-02-08 01:03:28 +03:00
, geoclue2
, json-glib
, wrapGAppsHook
}:
2017-10-03 02:19:20 +03:00
stdenv.mkDerivation rec {
pname = "xdg-desktop-portal";
version = "1.6.0";
2017-10-03 02:19:20 +03:00
outputs = [ "out" "installedTests" ];
src = fetchFromGitHub {
owner = "flatpak";
repo = pname;
2017-10-03 02:19:20 +03:00
rev = version;
sha256 = "0fbsfpilwbv7j6cimsmmz6g0r96bw0ziwyk9z4zg2rd1mfkmmp9a";
2017-10-03 02:19:20 +03:00
};
patches = [
2020-02-08 01:03:28 +03:00
# Hardcode paths used by x-d-p itself.
2019-02-22 00:23:04 +03:00
(substituteAll {
src = ./fix-paths.patch;
inherit flatpak;
})
];
2020-02-08 01:03:28 +03:00
nativeBuildInputs = [
autoreconfHook
pkgconfig
libxml2
wrapGAppsHook
];
buildInputs = [
glib
pipewire
fontconfig
flatpak
acl
dbus
geoclue2
fuse
libportal
2020-02-08 01:03:28 +03:00
gsettings-desktop-schemas
json-glib
];
2017-10-03 02:19:20 +03:00
# Seems to get stuck after "PASS: test-portals 39 /portal/inhibit/monitor"
# TODO: investigate!
doCheck = false;
2017-10-03 02:19:20 +03:00
configureFlags = [
"--enable-installed-tests"
];
makeFlags = [
2020-02-08 01:03:28 +03: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 02:19:20 +03:00
];
passthru = {
tests = {
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
};
};
2017-10-03 02:19:20 +03:00
meta = with stdenv.lib; {
description = "Desktop integration portals for sandboxed apps";
license = licenses.lgpl21;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
};
}