colord: make the daemon disablable

We can't build the daemon in pkgsMusl, because rustc does not support
dynamic Musl targets[1].  But it still makes sense to support the rest
of colord, because an application should still be able to link against
it to talk to a colord daemon built in some other way (e.g. provided
by a different distro).

[1]: https://github.com/NixOS/nixpkgs/issues/179242
This commit is contained in:
Alyssa Ross 2022-06-29 09:48:50 +00:00
parent 1c80cbf385
commit 46339db687
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -26,6 +26,7 @@
, docbook_xml_dtd_412
, gtk-doc
, libxslt
, enableDaemon ? !stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
@ -56,6 +57,7 @@ stdenv.mkDerivation rec {
"-Dlibcolordcompat=true"
"-Dsane=true"
"-Dvapi=true"
"-Ddaemon=${lib.boolToString enableDaemon}"
"-Ddaemon_user=colord"
];
@ -83,10 +85,11 @@ stdenv.mkDerivation rec {
gusb
lcms2
libgudev
polkit
sane-backends
sqlite
systemd
] ++ lib.optionals enableDaemon [
polkit
];
postInstall = ''