From 9cdf17e82239b230dbcafa3e4748221a0b677ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 3 Jan 2016 20:37:15 +0100 Subject: [PATCH] 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. --- pkgs/tools/misc/colord/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix index 40c9ddf8c946..3ba5a138e5a7 100644 --- a/pkgs/tools/misc/colord/default.nix +++ b/pkgs/tools/misc/colord/default.nix @@ -16,14 +16,20 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-udevrulesdir=$out/lib/udev/rules.d" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" + "--localstatedir=/var" "--disable-bash-completion" ]; + # don't touch /var at install time, colord creates what it needs at runtime + postPatch = '' + sed -i -e "s|if test -w .*;|if false;|" src/Makefile.in + sed -i -e "s|if test -w .*;|if false;|" src/Makefile.am + ''; + buildInputs = [ glib polkit pkgconfig intltool gusb libusb1 lcms2 sqlite systemd dbus gobjectIntrospection bashCompletion argyllcms automake autoconf libgudev ]; postInstall = '' - rm -fr $out/var/lib/colord mkdir -p $out/etc/bash_completion.d cp -v data/colormgr $out/etc/bash_completion.d '';