anchor.diff:      rm $out/etc/udev/rules.d/56-hpmud.rules
     '';
   
  +  # The installed executables are just symlinks into $out/share/hplip,
  +  # but wrapPythonPrograms ignores symlinks. We cannot replace the Python
  +  # modules in $out/share/hplip with wrapper scripts because they import
  +  # each other as libraries. Instead, we emulate wrapPythonPrograms by
  +  # 1. Calling patchPythonProgram on the original script in $out/share/hplip
  +  # 2. Making our own wrapper pointing directly to the original script.
  +  dontWrapPythonPrograms = true;
  +  preFixup = ''
  +    buildPythonPath "$out $pythonPath"
  +
  +    for bin in $out/bin/*; do
  +      py=$(readlink -m $bin)
  +      rm $bin
  +      echo "patching \`$py'..."
  +      patchPythonScript "$py"
  +      echo "wrapping \`$bin'..."
  +      makeWrapper "$py" "$bin" \
  +          --prefix PATH ':' "$program_PATH" \
  +          --set PYTHONNOUSERSITE "true" \
  +          $makeWrapperArgs
  +    done
  +  '';
  +
     postFixup = ''
  -    wrapProgram $out/lib/cups/filter/hpps \
  -      --prefix PATH : "${nettools}/bin"
  -
       substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
     '' + stdenv.lib.optionalString (!withPlugin) ''
       # A udev rule to notify users that they need the binary plugin.
  
positive.code:   ] ++ stdenv.lib.optionals qtSupport [
      pyqt4
    ];
  
    prePatch = ''
      # HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
  
negative.code: 
    nativeBuildInputs = [
      pkgconfig
    ];
  
    pythonPath = with pythonPackages; [
      dbus
      pillow
      pygobject2
  