15 , enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
17 , gobject-introspection
35 stdenv.mkDerivation rec {
39 outputs = [ "out" "dev" "devdoc" "man" "installedTests" ];
42 url = "https://www.freedesktop.org/software/colord/releases/colord-${version}.tar.xz";
43 sha256 = "dAdjGie/5dG2cueuQndwAcEF2GC3tzkig8jGMA3ojm8=";
47 # Put installed tests into its own output
48 ./installed-tests-path.patch
52 for file in data/tests/meson.build lib/colord/cd-test-shared.c lib/colord/meson.build; do
53 substituteInPlace $file --subst-var-by installed_tests_dir "$installedTests"
58 "--localstatedir=/var"
59 "-Dinstalled_tests=true"
60 "-Dlibcolordcompat=true"
63 "-Ddaemon=${lib.boolToString enableDaemon}"
64 "-Ddaemon_user=colord"
65 (lib.mesonBool "systemd" enableSystemd)
67 # The presence of the "udev" pkg-config module (as opposed to "libudev")
68 # indicates whether rules are supported.
69 (lib.mesonBool "udev_rules" (lib.elem "udev" udev.meta.pkgConfigModules))
86 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
101 ] ++ lib.optionals enableSystemd [
103 ] ++ lib.optionals enableDaemon [
108 glib-compile-schemas $out/share/glib-2.0/schemas
111 PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
112 PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
113 PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d";
114 PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR = "${placeholder "out"}/share/bash-completion/completions";
115 PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
119 installedTests = nixosTests.installed-tests.colord;
124 description = "System service to manage, install and generate color profiles to accurately color manage input and output devices";
125 homepage = "https://www.freedesktop.org/software/colord/";
126 license = licenses.lgpl2Plus;
127 maintainers = [ maintainers.marcweber ] ++ teams.freedesktop.members;
128 platforms = platforms.linux;