gcr: use lib.meta.availableOn instead of isLinux

This commit uses `lib.meta.availableOn hostPlatform systemd`
(instead of `hostPlatform.isLinux`) to decide whether or not to
depend on systemd.
This commit is contained in:
Adam Joseph 2023-06-12 02:59:31 -07:00
parent c8cb1f7a2d
commit 7c3c8d3d94

View file

@ -14,7 +14,7 @@
, pango , pango
, libsecret , libsecret
, openssh , openssh
, systemd , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
, gobject-introspection , gobject-introspection
, wrapGAppsHook , wrapGAppsHook
, gi-docgen , gi-docgen
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
pango pango
libsecret libsecret
openssh openssh
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals (systemdSupport) [
systemd systemd
]; ];
@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
# We are still using ssh-agent from gnome-keyring. # We are still using ssh-agent from gnome-keyring.
# https://github.com/NixOS/nixpkgs/issues/140824 # https://github.com/NixOS/nixpkgs/issues/140824
"-Dssh_agent=false" "-Dssh_agent=false"
] ++ lib.optionals (!stdenv.isLinux) [ ] ++ lib.optionals (!systemdSupport) [
"-Dsystemd=disabled" "-Dsystemd=disabled"
]; ];