anchor.diff:  { stdenv, fetchurl, substituteAll
   , pkgconfig
   , makeWrapper
  -, cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils
  -, net_snmp, openssl, polkit, nettools
  +, cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends
  +, dbus, file, ghostscript, usbutils
  +, net_snmp, openssl, perl, polkit, nettools
   , bash, coreutils, utillinux
   , withQt5 ? true
   , withPlugin ? false
  +, withStaticPPDInstall ? false
   }:
   
   let
   
     name = "hplip-${version}";
  -  version = "3.18.3";
  +  version = "3.18.5";
   
     src = fetchurl {
       url = "mirror://sourceforge/hplip/${name}.tar.gz";
  -    sha256 = "0x5xs86v18w46rxz5whc15bl4fb7p4km6xqjpwzclp83nl7rl01y";
  +    sha256 = "0xb7ga2wgbwjxsss67mjn2y6fmqsfwzmv11ivvfzhnl36lh22hkb";
     };
   
     plugin = fetchurl {
       url = "https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run";
  -    sha256 = "11nc3cifhd2h2c7p0dr2jjzrg3fd5j43ih1wy0m186l6wcgdjssw";
  +    sha256 = "1jf74jya071zqvwhy9n0c3007pzgcxydkw7qdh4sx70brly81i7p";
     };
   
     hplipState = substituteAll {
  
positive.code:     mkdir -p $out/share/hplip/prnt/plugins
      for plugin in lj hbpl1; do
        cp $plugin-${hplipArch}.so $out/share/hplip/prnt/plugins
        ln -s $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so \
          $out/share/hplip/prnt/plugins/$plugin.so
      done
  
      mkdir -p $out/share/hplip/scan/plugins
      for plugin in bb_soap bb_marvell bb_soapht fax_marvell; do
        cp $plugin-${hplipArch}.so $out/share/hplip/scan/plugins
        ln -s $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so \
          $out/share/hplip/scan/plugins/$plugin.so
      done
  
      mkdir -p $out/var/lib/hp
  
negative.code:       --with-systraydir=$out/xdg/autostart
        --with-mimedir=$out/etc/cups
        --enable-policykit
        ${stdenv.lib.optionalString withStaticPPDInstall "--enable-cups-ppd-install"}
        --disable-qt4
        ${stdenv.lib.optionalString withQt5 "--enable-qt5"}
      "
  