clightd: Add Yoctolight option

The clightd package supports/enables all the available build options except for
Yoctolight support. Yoctolight support requires no additional dependencies as
libusb is already a dep. This enables Yoctolight support so that the package can
be used on desktop systems with a Yoctolight module as the ALS.
This commit is contained in:
Archit Gupta 2022-10-29 21:42:55 -07:00
parent 84510146d4
commit 30904448bf

View File

@ -5,7 +5,8 @@
, enableDdc ? true, ddcutil
, enableDpms ? true, libXext
, enableGamma ? true, libdrm, libXrandr, wayland
, enableScreen ? true }:
, enableScreen ? true
, enableYoctolight ? true }:
stdenv.mkDerivation rec {
pname = "clightd";
@ -33,10 +34,11 @@ stdenv.mkDerivation rec {
"-DDBUS_CONFIG_DIR=${placeholder "out"}/etc/dbus-1/system.d"
# systemd.pc has prefix=${systemd.out}
"-DMODULE_LOAD_DIR=${placeholder "out"}/lib/modules-load.d"
] ++ optional enableDdc "-DENABLE_DDC=1"
++ optional enableDpms "-DENABLE_DPMS=1"
++ optional enableGamma "-DENABLE_GAMMA=1"
++ optional enableScreen "-DENABLE_SCREEN=1";
] ++ optional enableDdc "-DENABLE_DDC=1"
++ optional enableDpms "-DENABLE_DPMS=1"
++ optional enableGamma "-DENABLE_GAMMA=1"
++ optional enableScreen "-DENABLE_SCREEN=1"
++ optional enableYoctolight "-DENABLE_YOCTOLIGHT=1";
nativeBuildInputs = [
dbus