colord: fix use of /var

Currently the package is built with /var in $out/var. That fails when it
tries to create/write things at runtime (nix store is read-only).
Instead, tell it to use /var (global directory) and fixup the
installation phase so it doesn't touch /var (leave that for runtime).

This unbreaks the colord dbus service, which apparently is needed by
cups to create color profiles for printers.

+7 -1
+7 -1
pkgs/tools/misc/colord/default.nix
··· 16 16 configureFlags = [ 17 17 "--with-udevrulesdir=$out/lib/udev/rules.d" 18 18 "--with-systemdsystemunitdir=$(out)/etc/systemd/system" 19 + "--localstatedir=/var" 19 20 "--disable-bash-completion" 20 21 ]; 21 22 23 + # don't touch /var at install time, colord creates what it needs at runtime 24 + postPatch = '' 25 + sed -i -e "s|if test -w .*;|if false;|" src/Makefile.in 26 + sed -i -e "s|if test -w .*;|if false;|" src/Makefile.am 27 + ''; 28 + 22 29 buildInputs = [ glib polkit pkgconfig intltool gusb libusb1 lcms2 sqlite systemd dbus gobjectIntrospection 23 30 bashCompletion argyllcms automake autoconf libgudev ]; 24 31 25 32 postInstall = '' 26 - rm -fr $out/var/lib/colord 27 33 mkdir -p $out/etc/bash_completion.d 28 34 cp -v data/colormgr $out/etc/bash_completion.d 29 35 '';