anchor.diff:      mkdir -p $out/share/hplip/prnt/plugins
       for plugin in lj hbpl1; do
         cp $plugin-${hplipArch}.so $out/share/hplip/prnt/plugins
  +      chmod 0755 $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so
         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
  +    for plugin in bb_soap bb_marvell bb_soapht bb_escl; do
         cp $plugin-${hplipArch}.so $out/share/hplip/scan/plugins
  +      chmod 0755 $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so
         ln -s $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so \
           $out/share/hplip/scan/plugins/$plugin.so
  +    done
  +
  +    mkdir -p $out/share/hplip/fax/plugins
  +    for plugin in fax_marvell; do
  +      cp $plugin-${hplipArch}.so $out/share/hplip/fax/plugins
  +      chmod 0755 $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so
  +      ln -s $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so \
  +        $out/share/hplip/fax/plugins/$plugin.so
       done
   
       mkdir -p $out/var/lib/hp
  
positive.code: { stdenv, fetchurl, substituteAll
  , pkgconfig
  , makeWrapper
  , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils
  , net_snmp, openssl, polkit, nettools
  , bash, coreutils, utillinux
  , withQt5 ? true
  , withPlugin ? false
  }:
  
  let
  
    name = "hplip-${version}";
    version = "3.18.3";
  
    src = fetchurl {
      url = "mirror://sourceforge/hplip/${name}.tar.gz";
      sha256 = "0x5xs86v18w46rxz5whc15bl4fb7p4km6xqjpwzclp83nl7rl01y";
    };
  
    plugin = fetchurl {
      url = "https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run";
      sha256 = "11nc3cifhd2h2c7p0dr2jjzrg3fd5j43ih1wy0m186l6wcgdjssw";
    };
  
    hplipState = substituteAll {
  
negative.code:     libusb1
      sane-backends
      dbus
      file
      ghostscript
      net_snmp
      openssl
      perl
      zlib
    ];
  
  