mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
colord: add enableSystemd option
Since 7f2a6f17fc
("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.
This commit is contained in:
parent
b816a99cea
commit
4b2dbd4511
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue