seatd: honor systemdSupport attr (#160967)

This commit is contained in:
Adam Joseph 2022-04-08 13:26:44 +00:00 committed by GitHub
parent db0254cfcc
commit 10636e54bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
, pkg-config
, scdoc
, stdenv
, systemd
, systemdSupport ? stdenv.isLinux, systemd
}:
stdenv.mkDerivation rec {
@ -25,9 +25,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ meson ninja pkg-config scdoc ];
buildInputs = [ systemd ];
buildInputs = lib.optionals systemdSupport [ systemd ];
mesonFlags = [ "-Dlibseat-logind=systemd" "-Dlibseat-builtin=enabled" ];
mesonFlags = [
"-Dlibseat-logind=${if systemdSupport then "systemd" else "disabled"}"
"-Dlibseat-builtin=enabled"
"-Dserver=enabled"
];
meta = with lib; {
description = "A universal seat management library";