summary refs log tree commit diff
path: root/pkgs/tools/misc/colord/default.nix
blob: 9af7de8b35e44c66385f41587461ee363243b352 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ stdenv, fetchurl, bash-completion
, glib, polkit, pkgconfig, gettext, gusb, lcms2, sqlite, systemd, dbus
, gobjectIntrospection, argyllcms, meson, ninja, libxml2, vala_0_38
, libgudev, sane-backends, udev, gnome3, makeWrapper }:

stdenv.mkDerivation rec {
  name = "colord-1.4.1";

  src = fetchurl {
    url = "http://www.freedesktop.org/software/colord/releases/${name}.tar.xz";
    sha256 = "0m854clp8szvq38z16jpazzlqfb3lb3icxcfnsisfrc25748y1ib";
  };

  enableParallelBuilding = true;

  mesonFlags = [
    "-Denable-sane=true"
    "-Denable-vala=true"
    "--localstatedir=/var"
    "-Denable-bash-completion=true"
    # TODO: man page cannot be build with docbook2x
    "-Denable-man=false"
    "-Denable-docs=false"
  ];

  patches = [
    ./fix-build-paths.patch
  ];

  nativeBuildInputs = [ meson pkgconfig vala_0_38 ninja gettext libxml2 gobjectIntrospection makeWrapper ];

  buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus
                  bash-completion argyllcms libgudev sane-backends ];

  postInstall = ''
    glib-compile-schemas $out/share/glib-2.0/schemas
  '';

  postFixup = ''
    wrapProgram "$out/libexec/colord-session" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \
      --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib gnome3.dconf}/lib/gio/modules"
  '';

  meta = {
    description = "System service to manage, install and generate color profiles to accurately color manage input and output devices";
    homepage = https://www.freedesktop.org/software/colord/;
    license = stdenv.lib.licenses.lgpl2Plus;
    maintainers = [stdenv.lib.maintainers.marcweber];
    platforms = stdenv.lib.platforms.linux;
  };
}