mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
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.
(cherry picked from commit 9cdf17e822)
This commit is contained in:
@@ -15,14 +15,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 ];
|
||||
|
||||
postInstall = ''
|
||||
rm -fr $out/var/lib/colord
|
||||
mkdir -p $out/etc/bash_completion.d
|
||||
cp -v data/colormgr $out/etc/bash_completion.d
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user