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.
This commit is contained in:
parent
927f6f33e4
commit
9cdf17e822
|
@ -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
|
||||
'';
|
||||
|
|
Loading…
Reference in New Issue