gcr_4: add systemdSupport option

Since 7f2a6f17fc ("xdg-desktop-portal-gtk: Enable all default
portals unconditionally"), building gcr_4 is necessary to build
xdg-desktop-portal-gtk, but it wasn't possible for systems that can't
use systemd.

I've called the option "systemdSupport" for consistency with gcr (3)'s
equivalent option.
This commit is contained in:
Alyssa Ross 2024-10-10 17:13:35 +02:00
parent 4b2dbd4511
commit 744ab7a50e

View File

@ -22,6 +22,7 @@
, gnome
, python3
, shared-mime-info
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
}:
stdenv.mkDerivation rec {
@ -56,8 +57,9 @@ stdenv.mkDerivation rec {
pango
libsecret
openssh
systemd
gtk4
] ++ lib.optionals systemdSupport [
systemd
];
propagatedBuildInputs = [
@ -74,6 +76,7 @@ stdenv.mkDerivation rec {
# https://github.com/NixOS/nixpkgs/issues/140824
"-Dssh_agent=false"
"-Dgpg_path=${lib.getBin gnupg}/bin/gpg"
(lib.mesonEnable "systemd" systemdSupport)
];
doCheck = false; # fails 21 out of 603 tests, needs dbus daemon