8 , gobject-introspection
18 assert variant == null || variant == "gtk3" || variant == "gtk4" || variant == "qt5";
20 stdenv.mkDerivation rec {
21 pname = "libportal" + lib.optionalString (variant != null) "-${variant}";
24 outputs = [ "out" "dev" ]
25 ++ lib.optional (variant != "qt5") "devdoc";
27 src = fetchFromGitHub {
31 sha256 = "sha256-wDDE43UC6FBgPYLS+WWExeheURCH/3fCKu5oJg7GM+A=";
36 # https://github.com/flatpak/libportal/pull/107
38 name = "check-presence-of-sys-vfs-h.patch";
39 url = "https://github.com/flatpak/libportal/commit/e91a5d2ceb494ca0dd67295736e671b0142c7540.patch";
40 sha256 = "sha256-uFyhlU2fJgW4z0I31fABdc+pimLFYkqM4lggSIFs1tw=";
53 ] ++ lib.optionals (variant != "qt5") [
58 propagatedBuildInputs = [
60 ] ++ lib.optionals (variant == "gtk3") [
62 ] ++ lib.optionals (variant == "gtk4") [
64 ] ++ lib.optionals (variant == "qt5") [
66 libsForQt5.qtx11extras
70 "-Dbackends=${lib.optionalString (variant != null) variant}"
71 "-Dvapi=${if variant != "qt5" then "true" else "false"}"
72 "-Dintrospection=${if variant != "qt5" then "true" else "false"}"
73 "-Ddocs=${if variant != "qt5" then "true" else "false"}" # requires introspection=true
77 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
78 moveToOutput "share/doc" "$devdoc"
81 # we don't have any binaries
82 dontWrapQtApps = true;
85 description = "Flatpak portal library";
86 homepage = "https://github.com/flatpak/libportal";
87 license = licenses.lgpl3Plus;
88 maintainers = with maintainers; [ jtojnar ];
89 platforms = platforms.unix;