Commit 4b2dbd45 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

colord: add enableSystemd option

Since 7f2a6f17 ("xdg-desktop-portal-gtk: Enable all default
portals unconditionally"), building colord 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 "enableSystemd" for consistency with the
existing "enableDaemon" option.

As usual in Nixpkgs, the user is responsible for also overriding udev
to a non-systemd implementation if necessary.
parent b816a99c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -10,7 +10,9 @@
, gusb
, lcms2
, sqlite
, udev
, systemd
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
, dbus
, gobject-introspection
, argyllcms
@@ -60,6 +62,11 @@ stdenv.mkDerivation rec {
    "-Dvapi=true"
    "-Ddaemon=${lib.boolToString enableDaemon}"
    "-Ddaemon_user=colord"
    (lib.mesonBool "systemd" enableSystemd)

    # The presence of the "udev" pkg-config module (as opposed to "libudev")
    # indicates whether rules are supported.
    (lib.mesonBool "udev_rules" (lib.elem "udev" udev.meta.pkgConfigModules))
  ];

  nativeBuildInputs = [
@@ -90,6 +97,8 @@ stdenv.mkDerivation rec {
    libgudev
    sane-backends
    sqlite
    udev
  ] ++ lib.optionals enableSystemd [
    systemd
  ] ++ lib.optionals enableDaemon [
    polkit