Merge pull request #232694 from Scrumplex/libportal-qt5-zhf

libportal: fix build for qt5 variant
This commit is contained in:
Stanisław Pitucha 2023-05-20 22:13:37 +10:00 committed by GitHub
commit 08acd91f92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
pname = "libportal" + lib.optionalString (variant != null) "-${variant}";
version = "0.6";
outputs = [ "out" "dev" "devdoc" ];
outputs = [ "out" "dev" ]
++ lib.optional (variant != "qt5") "devdoc";
src = fetchFromGitHub {
owner = "flatpak";
@ -62,12 +63,14 @@ stdenv.mkDerivation rec {
gtk4
] ++ lib.optionals (variant == "qt5") [
libsForQt5.qtbase
libsForQt5.qtx11extras
];
mesonFlags = [
"-Dbackends=${lib.optionalString (variant != null) variant}"
"-Dvapi=${if variant != "qt5" then "true" else "false"}"
"-Dintrospection=${if variant != "qt5" then "true" else "false"}"
"-Ddocs=${if variant != "qt5" then "true" else "false"}" # requires introspection=true
];
postFixup = ''
@ -75,6 +78,9 @@ stdenv.mkDerivation rec {
moveToOutput "share/doc" "$devdoc"
'';
# we don't have any binaries
dontWrapQtApps = true;
meta = with lib; {
description = "Flatpak portal library";
homepage = "https://github.com/flatpak/libportal";