python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / colord / default.nix
blobc2a3cd10803f85a00405fe480aa233b2649a0a2c
1 { lib
2 , stdenv
3 , fetchurl
4 , nixosTests
5 , bash-completion
6 , glib
7 , polkit
8 , pkg-config
9 , gettext
10 , gusb
11 , lcms2
12 , sqlite
13 , systemd
14 , dbus
15 , gobject-introspection
16 , argyllcms
17 , meson
18 , ninja
19 , vala
20 , libgudev
21 , wrapGAppsNoGuiHook
22 , shared-mime-info
23 , sane-backends
24 , docbook_xsl
25 , docbook_xsl_ns
26 , docbook_xml_dtd_412
27 , gtk-doc
28 , libxslt
29 , enableDaemon ? true
32 stdenv.mkDerivation rec {
33   pname = "colord";
34   version = "1.4.6";
36   outputs = [ "out" "dev" "devdoc" "man" "installedTests" ];
38   src = fetchurl {
39     url = "https://www.freedesktop.org/software/colord/releases/${pname}-${version}.tar.xz";
40     sha256 = "dAdjGie/5dG2cueuQndwAcEF2GC3tzkig8jGMA3ojm8=";
41   };
43   patches = [
44     # Put installed tests into its own output
45     ./installed-tests-path.patch
46   ];
48   postPatch = ''
49     for file in data/tests/meson.build lib/colord/cd-test-shared.c lib/colord/meson.build; do
50         substituteInPlace $file --subst-var-by installed_tests_dir "$installedTests"
51     done
52   '';
54   mesonFlags = [
55     "--localstatedir=/var"
56     "-Dinstalled_tests=true"
57     "-Dlibcolordcompat=true"
58     "-Dsane=true"
59     "-Dvapi=true"
60     "-Ddaemon=${lib.boolToString enableDaemon}"
61     "-Ddaemon_user=colord"
62   ];
64   nativeBuildInputs = [
65     docbook_xml_dtd_412
66     docbook_xsl
67     docbook_xsl_ns
68     gettext
69     gobject-introspection
70     gtk-doc
71     libxslt
72     meson
73     ninja
74     pkg-config
75     shared-mime-info
76     vala
77     wrapGAppsNoGuiHook
78   ];
80   buildInputs = [
81     argyllcms
82     bash-completion
83     dbus
84     glib
85     gusb
86     lcms2
87     libgudev
88     sane-backends
89     sqlite
90     systemd
91   ] ++ lib.optionals enableDaemon [
92     polkit
93   ];
95   postInstall = ''
96     glib-compile-schemas $out/share/glib-2.0/schemas
97   '';
99   PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
100   PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
101   PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d";
102   PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR = "${placeholder "out"}/share/bash-completion/completions";
103   PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
105   passthru = {
106     tests = {
107       installedTests = nixosTests.installed-tests.colord;
108     };
109   };
111   meta = with lib; {
112     description = "System service to manage, install and generate color profiles to accurately color manage input and output devices";
113     homepage = "https://www.freedesktop.org/software/colord/";
114     license = licenses.lgpl2Plus;
115     maintainers = [ maintainers.marcweber ] ++ teams.freedesktop.members;
116     platforms = platforms.linux;
117   };