From 46339db687cb7daf92af20db1c14152ade29c4a1 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 29 Jun 2022 09:48:50 +0000 Subject: [PATCH] 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 --- pkgs/tools/misc/colord/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix index 079f75c4ca86..77d06a6848ac 100644 --- a/pkgs/tools/misc/colord/default.nix +++ b/pkgs/tools/misc/colord/default.nix @@ -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 = ''