cosmic-comp: optional useSystemd

Allow the optional use of Systemd by turning off the default features.
Also see: https://github.com/pop-os/cosmic-comp/blob/e569e14a99c6471dd7b9536d795448f2a8c8c948/Cargo.toml

Signed-off-by: Fl1tzi <git@fl1tzi.com>
This commit is contained in:
Fl1tzi
2024-01-28 20:02:20 +01:00
committed by Alyssa Ross
parent ec740c7b63
commit 2cfc714455
+15 -1
View File
@@ -1,4 +1,5 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, makeBinaryWrapper
@@ -13,6 +14,8 @@
, wayland
, xorg
, useXWayland ? true
, systemd
, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
}:
rustPlatform.buildRustPackage {
@@ -42,7 +45,18 @@ rustPlatform.buildRustPackage {
separateDebugInfo = true;
nativeBuildInputs = [ makeBinaryWrapper pkg-config ];
buildInputs = [ libglvnd libinput libxkbcommon mesa seatd udev wayland ];
buildInputs = [
libglvnd
libinput
libxkbcommon
mesa
seatd
udev
wayland
] ++ lib.optional useSystemd systemd;
# Only default feature is systemd
buildNoDefaultFeatures = !useSystemd;
# Force linking to libEGL, which is always dlopen()ed, and to
# libwayland-client, which is always dlopen()ed except by the