diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-01-03 20:37:15 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-01-03 21:07:04 +0100 |
commit | 9cdf17e82239b230dbcafa3e4748221a0b677ff7 (patch) | |
tree | 2c290db348ceaf4a110b3c868020ca253936b5d3 /pkgs/tools/misc | |
parent | 927f6f33e4c194158bab591101a1241195b30e92 (diff) | |
download | nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.tar nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.tar.gz nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.tar.bz2 nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.tar.lz nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.tar.xz nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.tar.zst nixlib-9cdf17e82239b230dbcafa3e4748221a0b677ff7.zip |
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.
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/colord/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
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 ''; |