16 enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
18 gobject-introspection,
36 stdenv.mkDerivation rec {
49 url = "https://www.freedesktop.org/software/colord/releases/colord-${version}.tar.xz";
50 sha256 = "dAdjGie/5dG2cueuQndwAcEF2GC3tzkig8jGMA3ojm8=";
54 # Put installed tests into its own output
55 ./installed-tests-path.patch
59 for file in data/tests/meson.build lib/colord/cd-test-shared.c lib/colord/meson.build; do
60 substituteInPlace $file --subst-var-by installed_tests_dir "$installedTests"
65 "--localstatedir=/var"
66 "-Dinstalled_tests=true"
67 "-Dlibcolordcompat=true"
70 "-Ddaemon=${lib.boolToString enableDaemon}"
71 "-Ddaemon_user=colord"
72 (lib.mesonBool "systemd" enableSystemd)
74 # The presence of the "udev" pkg-config module (as opposed to "libudev")
75 # indicates whether rules are supported.
76 (lib.mesonBool "udev_rules" (lib.elem "udev" udev.meta.pkgConfigModules))
95 ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
112 ++ lib.optionals enableSystemd [
115 ++ lib.optionals enableDaemon [
120 glib-compile-schemas $out/share/glib-2.0/schemas
123 PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
124 PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
125 PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d";
126 PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR = "${placeholder "out"}/share/bash-completion/completions";
127 PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
131 installedTests = nixosTests.installed-tests.colord;
136 description = "System service to manage, install and generate color profiles to accurately color manage input and output devices";
137 homepage = "https://www.freedesktop.org/software/colord/";
138 license = licenses.lgpl2Plus;
139 maintainers = [ maintainers.marcweber ] ++ teams.freedesktop.members;
140 platforms = platforms.linux;